|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.percederberg.grammatica.code.CodeElement | +--net.percederberg.grammatica.code.java.JavaPackage
A class generating a Java package declaration.
Constructor Summary | |
JavaPackage(JavaPackage base,
java.lang.String name)
Creates a new Java package with the specified base package and name. |
|
JavaPackage(java.lang.String name)
Creates a new Java package with the specified name. |
Method Summary | |
int |
category()
Returns a numeric category number for the code element. |
void |
print(java.io.PrintWriter out,
CodeStyle style,
int indent)
Prints the code element to the specified output stream. |
java.io.File |
toFile(java.io.File baseDir)
Returns the directory file containing the package files. |
java.lang.String |
toString()
Returns a string representation of this package. |
Methods inherited from class net.percederberg.grammatica.code.CodeElement |
compareTo |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JavaPackage(java.lang.String name)
name
- the package name (including dots '.')public JavaPackage(JavaPackage base, java.lang.String name)
base
- the base packagename
- the package name (including dots '.')Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public int category()
category
in class CodeElement
public java.io.File toFile(java.io.File baseDir)
baseDir
- the base output directory
public void print(java.io.PrintWriter out, CodeStyle style, int indent)
print
in class CodeElement
out
- 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 |