|
|||||||||||
| 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.JavaImport
A class generating a Java import declaration.
| Constructor Summary | |
JavaImport(JavaPackage pkg)
Creates a new import declaration, importing all classes of a specified package. |
|
JavaImport(JavaPackage pkg,
JavaClass cls)
Creates a new import declaration, importing the selected class from the specified package. |
|
JavaImport(java.lang.String packageName)
Creates a new import declaration, importing all classes of a specified package. |
|
JavaImport(java.lang.String packageName,
java.lang.String className)
Creates a new import declaration, importing the selected class from the specified package. |
|
| Method Summary | |
int |
category()
Returns a numeric category number for the code element. |
int |
compareTo(java.lang.Object obj)
Compares this object to another one. |
boolean |
equals(java.lang.Object obj)
Returns true if this object is equal to another import. |
void |
print(java.io.PrintWriter out,
CodeStyle style,
int indent)
Prints the code element to the specified output stream. |
java.lang.String |
toString()
Returns a string description of the imported packages. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public JavaImport(JavaPackage pkg)
pkg - the package to importpublic JavaImport(java.lang.String packageName)
packageName - the fully qualified package name
public JavaImport(JavaPackage pkg,
JavaClass cls)
pkg - the package containing the specified classcls - the class to import
public JavaImport(java.lang.String packageName,
java.lang.String className)
packageName - the fully qualified package nameclassName - the class name| Method Detail |
public int compareTo(java.lang.Object obj)
compareTo in interface java.lang.ComparablecompareTo in class CodeElementobj - the object to compare to
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare to
public java.lang.String toString()
toString in class java.lang.Objectpublic 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 | ||||||||||