|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Declaration
subinterface for compilation units.
A compilation unit is the source code atom in a typical filesystem.
It consists of three parts, each of which is optional:
Method Summary | |
Import |
addImport(java.lang.String name)
Adds the given import declaration to the compilation unit. |
boolean |
compile()
Generates the source code file and compiles it. |
void |
encode()
Generates the source code file. |
java.lang.String |
getCodebase()
Returns the filesystem location where the compilation unit should be written. |
Iterator |
getImports()
Gets the list of imports as an iterator of ImportDeclaration |
Namespace |
getNamespace()
Returns the package name as a Package . |
TypeDeclaration |
getTopLevelType()
Gets the top level class or interface. |
Iterator |
getTypes()
Returns a list of types members as an iterator of TypeDeclaration . |
PackageClass |
newClass(java.lang.String name)
Adds a new class to this compilation unit. |
Interface |
newInterface(java.lang.String name)
Adds a new interface to this compilation unit. |
Namespace |
setNamespace(java.lang.String name)
Sets the package name and returns the corresponding package declaration. |
Methods inherited from interface org.inxar.jenesis.Codeable |
getComment, setComment, toCode, vm |
Method Detail |
public void encode() throws java.io.IOException
public boolean compile() throws java.io.IOException
public Namespace getNamespace()
Package
.public java.lang.String getCodebase()
public Namespace setNamespace(java.lang.String name)
public Iterator getImports()
ImportDeclaration
public Import addImport(java.lang.String name)
public TypeDeclaration getTopLevelType()
public PackageClass newClass(java.lang.String name)
public Interface newInterface(java.lang.String name)
public Iterator getTypes()
TypeDeclaration
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |