|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.sourceflow.CodeElement
org.sourceflow.CodeContainer
org.sourceflow.CodeFile
org.sourceflow.java.JavaFile
A class generating a Java code file.
| Constructor Summary | |
JavaFile(java.io.File basedir)
Creates a new Java code file in the specified file. |
|
JavaFile(java.io.File basedir,
JavaPackage filePackage)
Creates a new Java code file in the specified base directory and package. |
|
| Method Summary | |
void |
addClass(JavaClass cls)
Adds a class to the file. |
void |
addComment(JavaComment comment)
Adds a comment to this file. |
void |
addImport(JavaImport imp)
Adds an import to the file. |
void |
addInterface(JavaInterface ifc)
Adds an interface to the file. |
int |
category()
Returns a numeric category number for the code element. |
java.lang.String |
getName()
Returns the file name. |
void |
print(java.io.PrintWriter out,
CodeStyle style,
int indent)
Prints the file contents to the specified output stream. |
| Methods inherited from class org.sourceflow.CodeFile |
getFile, toString, write |
| Methods inherited from class org.sourceflow.CodeContainer |
addElement, printContents, size |
| Methods inherited from class org.sourceflow.CodeElement |
compareTo, printSeparator |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public JavaFile(java.io.File basedir)
basedir - the base output directory
public JavaFile(java.io.File basedir,
JavaPackage filePackage)
basedir - the base output directoryfilePackage - the package the file belongs to| Method Detail |
public java.lang.String getName()
getName in class CodeFilepublic void addComment(JavaComment comment)
comment - the new file commentpublic void addImport(JavaImport imp)
imp - the import to addpublic void addClass(JavaClass cls)
cls - the class to addpublic void addInterface(JavaInterface ifc)
ifc - the interface to addpublic int category()
category in class CodeElement
public void print(java.io.PrintWriter out,
CodeStyle style,
int indent)
print in class CodeElementout - the output streamstyle - the code style to useindent - the indentation level
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||