public interface ClassContainer
Modifier and Type | Method and Description |
---|---|
GeneratedClass |
_annotationTypeDeclaration(String name)
Add an annotationType Declaration to this package
|
GeneratedClass |
_class(int mods,
String name)
Add a new class to this package/class.
|
GeneratedClass |
_class(int mods,
String name,
boolean isInterface)
Deprecated.
|
GeneratedClass |
_class(int mods,
String name,
GeneratedClassType kind)
Creates a new class/enum/interface/annotation.
|
GeneratedClass |
_class(String name)
Add a new public class to this class/package.
|
GeneratedClass |
_enum(String name)
Add a public enum to this package
|
GeneratedClass |
_interface(int mods,
String name)
Add an interface to this class/package.
|
GeneratedClass |
_interface(String name)
Adds a public interface to this package.
|
Iterator<GeneratedClass> |
classes()
Returns an iterator that walks the nested classes defined in this
class.
|
GeneratedPackage |
getPackage()
Gets the nearest package parent.
|
boolean |
isClass()
Returns true if the container is a class.
|
boolean |
isPackage()
Returns true if the container is a package.
|
CodeModel |
owner()
Get the root code model object.
|
ClassContainer |
parentContainer()
Parent ClassContainer.
|
boolean isClass()
boolean isPackage()
GeneratedClass _class(int mods, String name) throws ClassAlreadyExistsException
mods
- Modifiers for this class declarationname
- Name of class to be added to this packageClassAlreadyExistsException
- When the specified class/interface was already created.GeneratedClass _class(String name) throws ClassAlreadyExistsException
ClassAlreadyExistsException
- When the specified class/interface was already created.GeneratedClass _interface(int mods, String name) throws ClassAlreadyExistsException
mods
- Modifiers for this interface declarationname
- Name of interface to be added to this packageClassAlreadyExistsException
- When the specified class/interface was already created.GeneratedClass _interface(String name) throws ClassAlreadyExistsException
ClassAlreadyExistsException
- When the specified class/interface was already created.GeneratedClass _class(int mods, String name, boolean isInterface) throws ClassAlreadyExistsException
_class(int, String, GeneratedClassType)
ClassAlreadyExistsException
GeneratedClass _class(int mods, String name, GeneratedClassType kind) throws ClassAlreadyExistsException
ClassAlreadyExistsException
Iterator<GeneratedClass> classes()
ClassContainer parentContainer()
GeneratedPackage getPackage()
CodeModel owner()
GeneratedClass _annotationTypeDeclaration(String name) throws ClassAlreadyExistsException
name
- Name of the annotation Type declaration to be added to this packageClassAlreadyExistsException
- When the specified class/interface was already created.GeneratedClass _enum(String name) throws ClassAlreadyExistsException
name
- Name of the enum to be added to this packageClassAlreadyExistsException
- When the specified class/interface was already created.Copyright © 2010–2015 MuleSoft, Inc.. All rights reserved.