ca.quine.jcommons.sourcegen
Class JavaSourceFile
java.lang.Object
|
+--ca.quine.jcommons.sourcegen.JavaSourceFile
- public class JavaSourceFile
- extends Object
Holds data related to and can output a Java source file.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaSourceFile
public JavaSourceFile(String packageName)
setPrepackageCommentFilename
public void setPrepackageCommentFilename(String filename)
- Sets a file to be output as the comments before the package declaration.
No extra blank lines will be added after the file is put into the
output. If a blank line (or more than one) is desired between the file
and the package declaration, add the blank line(s) to the input file.
This file must already contain the comment start and end tokens, i.e.
"/*", "/**", or "/*-", along with the appropriate end token. For more
information about the third form, see Sun's documentation on using the
indent tool.
This method is expected to be used primarily for licencing information.
- Parameters:
filename
- The filename of the file to include in the output
before the package declaration.
getPrepackageCommentFilename
public String getPrepackageCommentFilename()
setPrepackageComments
public void setPrepackageComments(String comment)
- Sets a String to be output as the comments before the package
declaration. This String must already contain the comment start and
end tokens, i.e. "/*", "/**", or "/*-", along with the appropriate
end token. For more information about the third form, see Sun's
documentation regarding use of the
getPrepackageComments
public String getPrepackageComments()
getImports
public ArrayList getImports()
setImports
public void setImports(ArrayList imports)
getPackageName
public String getPackageName()
setPackageName
public void setPackageName(String packageName)
getPublicClass
public ClassSource getPublicClass()
setPublicClass
public void setPublicClass(ClassSource publicClass)
output
public void output(FormattingRules rules,
StringBuffer buffer)
throws IOException
IOException