|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.devkit.model.code.GeneratedPackage
public final class GeneratedPackage
A Java package.
| Method Summary | ||
|---|---|---|
GeneratedClass |
_annotationTypeDeclaration(String name)
Add an annotationType Declaration to this package |
|
GeneratedClass |
_class(int mods,
String name)
Add a class to this package. |
|
GeneratedClass |
_class(int mods,
String name,
boolean isInterface)
Deprecated. |
|
GeneratedClass |
_class(int modifiers,
String name,
Class<?>[] _implements)
Adds a public class to this package. |
|
GeneratedClass |
_class(int modifiers,
String name,
Class<?> _extends,
Class<?>[] _implements)
Adds a public class to this package. |
|
GeneratedClass |
_class(int modifiers,
String name,
GeneratedClass _extends,
Class<?>[] _implements)
Adds a public class to this package. |
|
GeneratedClass |
_class(int mods,
String name,
GeneratedClassType classTypeVal)
Creates a new class/enum/interface/annotation. |
|
GeneratedClass |
_class(int modifiers,
String name,
TypeReference _extends)
Adds a public class to this package. |
|
GeneratedClass |
_class(String name)
Adds a public class to this package. |
|
GeneratedClass |
_class(String name,
Class<?> _extends)
Adds a public class to this package. |
|
GeneratedClass |
_class(String name,
Class<?>[] _implements)
Adds a public class to this package. |
|
GeneratedClass |
_class(String name,
Class<?> _extends,
Class<?>[] _implements)
Adds a public class to this package. |
|
GeneratedClass |
_class(String name,
GeneratedClass _extends,
Class<?>[] _implements)
Adds a public class to this package. |
|
GeneratedClass |
_class(String name,
TypeReference _extends)
Adds a public class to this package. |
|
GeneratedClass |
_class(String name,
TypeReference _extends,
Class<?>[] _implements)
Adds a public class to this package. |
|
GeneratedClass |
_enum(String name)
Add a public enum to this package |
|
GeneratedClass |
_getClass(String name)
Gets a reference to the already created GeneratedClass. |
|
GeneratedClass |
_interface(int mods,
String name)
Add an interface to this package. |
|
GeneratedClass |
_interface(String name)
Adds a public interface to this package. |
|
ResourceFile |
addResourceFile(ResourceFile rsrc)
Adds a new resource file to this package. |
|
GeneratedAnnotationUse |
annotate(Class<? extends Annotation> clazz)
Adds an annotation to this program element. |
|
GeneratedAnnotationUse |
annotate(TypeReference clazz)
Adds an annotation to this program element. |
|
|
annotate2(Class<W> clazz)
Adds an annotation to this program element and returns a type-safe writer to fill in the values of such annotations. |
|
Collection<GeneratedAnnotationUse> |
annotations()
Read-only live view of all annotations on this Annotable |
|
Iterator<GeneratedClass> |
classes()
Returns an iterator that walks the top-level classes defined in this package. |
|
int |
compareTo(GeneratedPackage that)
Order is based on the lexicological order of the package name. |
|
void |
declare(Formatter f)
|
|
void |
generate(Formatter f)
|
|
GeneratedPackage |
getPackage()
Gets the nearest package parent. |
|
boolean |
hasResourceFile(String name)
Checks if a resource of the given name exists. |
|
boolean |
isClass()
Returns true if the container is a class. |
|
boolean |
isDefined(String classLocalName)
Checks if a given name is already defined as a class/interface |
|
boolean |
isPackage()
Returns true if the container is a package. |
|
boolean |
isUnnamed()
Checks if this package is the root, unnamed package. |
|
GeneratedJavaDocComment |
javadoc()
Creates, if necessary, and returns the package javadoc for this DefinedClass. |
|
String |
name()
Get the name of this package |
|
CodeModel |
owner()
Return the code model root object being used to create this package. |
|
GeneratedPackage |
parent()
Gets the parent package, or null if this class is the root package. |
|
ClassContainer |
parentContainer()
Parent ClassContainer. |
|
Iterator<ResourceFile> |
propertyFiles()
Iterates all resource files in this package. |
|
TypeReference |
ref(String name)
Reference a class within this package. |
|
void |
remove(TypeReference c)
Removes a class from this package. |
|
GeneratedPackage |
subPackage(String pkg)
Gets a reference to a sub package of this package. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public ClassContainer parentContainer()
ClassContainer
parentContainer in interface ClassContainerpublic GeneratedPackage parent()
public boolean isClass()
ClassContainer
isClass in interface ClassContainerpublic boolean isPackage()
ClassContainer
isPackage in interface ClassContainerpublic GeneratedPackage getPackage()
ClassContainer
getPackage in interface ClassContainer
public GeneratedClass _class(int mods,
String name)
_class in interface ClassContainermods - Modifiers for this class declarationname - Name of class to be added to this package
ClassAlreadyExistsException - When the specified class/interface was already created.
public GeneratedClass _class(int mods,
String name,
boolean isInterface)
throws ClassAlreadyExistsException
_class in interface ClassContainerClassAlreadyExistsException
public GeneratedClass _class(int mods,
String name,
GeneratedClassType classTypeVal)
throws ClassAlreadyExistsException
ClassContainer
_class in interface ClassContainerClassAlreadyExistsExceptionpublic GeneratedClass _class(String name)
_class in interface ClassContainer
public GeneratedClass _class(String name,
TypeReference _extends)
public GeneratedClass _class(int modifiers,
String name,
TypeReference _extends)
public GeneratedClass _class(String name,
Class<?> _extends)
public GeneratedClass _class(String name,
Class<?> _extends,
Class<?>[] _implements)
public GeneratedClass _class(int modifiers,
String name,
Class<?> _extends,
Class<?>[] _implements)
public GeneratedClass _class(String name,
GeneratedClass _extends,
Class<?>[] _implements)
public GeneratedClass _class(String name,
TypeReference _extends,
Class<?>[] _implements)
public GeneratedClass _class(int modifiers,
String name,
GeneratedClass _extends,
Class<?>[] _implements)
public GeneratedClass _class(String name,
Class<?>[] _implements)
public GeneratedClass _class(int modifiers,
String name,
Class<?>[] _implements)
public GeneratedClass _getClass(String name)
GeneratedClass.
public int compareTo(GeneratedPackage that)
compareTo in interface Comparable<GeneratedPackage>
public GeneratedClass _interface(int mods,
String name)
_interface in interface ClassContainermods - Modifiers for this interface declarationname - Name of interface to be added to this package
public GeneratedClass _interface(String name)
throws ClassAlreadyExistsException
_interface in interface ClassContainerClassAlreadyExistsException - When the specified class/interface was already created.
public GeneratedClass _annotationTypeDeclaration(String name)
throws ClassAlreadyExistsException
_annotationTypeDeclaration in interface ClassContainername - Name of the annotation Type declaration to be added to this package
ClassAlreadyExistsException - When the specified class/interface was already created.
public GeneratedClass _enum(String name)
throws ClassAlreadyExistsException
_enum in interface ClassContainername - Name of the enum to be added to this package
ClassAlreadyExistsException - When the specified class/interface was already created.public ResourceFile addResourceFile(ResourceFile rsrc)
public boolean hasResourceFile(String name)
public Iterator<ResourceFile> propertyFiles()
public GeneratedJavaDocComment javadoc()
javadoc in interface Documentablepublic void remove(TypeReference c)
public TypeReference ref(String name)
throws ClassNotFoundException
ClassNotFoundExceptionpublic GeneratedPackage subPackage(String pkg)
public Iterator<GeneratedClass> classes()
classes in interface ClassContainerpublic boolean isDefined(String classLocalName)
public final boolean isUnnamed()
public String name()
"java.lang"public final CodeModel owner()
owner in interface ClassContainerpublic GeneratedAnnotationUse annotate(TypeReference clazz)
Annotable
annotate in interface Annotableclazz - The annotation class to annotate the program element withpublic GeneratedAnnotationUse annotate(Class<? extends Annotation> clazz)
Annotable
annotate in interface Annotableclazz - The annotation class to annotate the program element withpublic <W extends AnnotationWriter> W annotate2(Class<W> clazz)
Annotable
annotate2 in interface Annotablepublic Collection<GeneratedAnnotationUse> annotations()
AnnotableAnnotable
annotations in interface Annotablepublic void declare(Formatter f)
declare in interface Declarationpublic void generate(Formatter f)
generate in interface Generable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||