Method Summary |
|
public JDefinedClass | _annotationTypeDeclaration(String name) |
public JDefinedClass | _class(int mods, String name) Add a class to this package. |
public JDefinedClass | _class(int mods, String name, boolean isInterface) |
public JDefinedClass | _class(int mods, String name, ClassType classTypeVal) |
public JDefinedClass | _class(String name) Adds a public class to this package. |
public JDefinedClass | _enum(String name) |
public JDefinedClass | _getClass(String name) Gets a reference to the already created
JDefinedClass . |
public JDefinedClass | _interface(int mods, String name) Add an interface to this package. |
public JDefinedClass | _interface(String name) Adds a public interface to this package. |
public JResourceFile | addResourceFile(JResourceFile rsrc) Adds a new resource file to this package. |
public JAnnotationUse | annotate(JClass clazz) |
public JAnnotationUse | annotate(Class<? extends Annotation> clazz) |
public W | annotate2(Class<W> clazz) |
void | build(CodeWriter src, CodeWriter res) |
public Iterator<JDefinedClass> | classes() Returns an iterator that walks the top-level classes defined in this
package. |
public int | compareTo(JPackage that) Order is based on the lexicological order of the package name. |
int | countArtifacts() |
public void | declare(JFormatter f) |
public void | generate(JFormatter f) |
public JPackage | getPackage() |
public boolean | hasResourceFile(String name) Checks if a resource of the given name exists. |
public boolean | isClass() |
public boolean | isDefined(String classLocalName) |
public boolean | isPackage() |
final public boolean | isUnnamed() Checks if this package is the root, unnamed package. |
public JDocComment | javadoc() Creates, if necessary, and returns the package javadoc for this
JDefinedClass. |
public String | name() Get the name of this package
The name of this package, or the empty string if this is thenull package. |
final public JCodeModel | owner() Return the code model root object being used to create this package. |
public JPackage | parent() Gets the parent package, or null if this class is the root package. |
public JClassContainer | parentContainer() |
public Iterator | propertyFiles() Iterates all resource files in this package. |
public JClass | ref(String name) Reference a class within this package. |
public void | remove(JClass c) Removes a class from this package. |
public JPackage | subPackage(String pkg) Gets a reference to a sub package of this package. |
File | toPath(File dir) |