public class GeneratedClass extends GeneratedMember implements MetaClass, GeneratedContext, GeneratedSourceContext
Modifier and Type | Field and Description |
---|---|
protected List<GeneratedBlock> |
blocks |
protected List<GeneratedConstructor> |
constructors |
protected List<GeneratedField> |
fields |
protected Map<String,GeneratedClass> |
innerClasses |
protected List<MetaType> |
interfaces |
protected GeneratedPackage |
metaPackage |
protected List<GeneratedMethod> |
methods |
protected List<GeneratedDeclaration> |
ordered
fields, blocks and dirt
|
protected GeneratedSourceContext |
parentSource |
static MetaClass |
rootClass |
protected MetaType |
superClass |
enclosing, name
getRawType, refer
format
addTypeVariable, addTypeVariable, getName, getTypeVariables
getModifiers, setModifiers
addAnnotation, addAnnotation, addAnnotation, addComment, getAnnotations, getComments, getRawComments, hasMetadata
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getModifiers
protected final GeneratedPackage metaPackage
protected MetaType superClass
protected GeneratedSourceContext parentSource
protected Map<String,GeneratedClass> innerClasses
protected List<GeneratedConstructor> constructors
protected List<GeneratedField> fields
protected List<GeneratedMethod> methods
protected List<GeneratedBlock> blocks
protected List<GeneratedDeclaration> ordered
public static final MetaClass rootClass
public final GeneratedContext getParentContext()
getParentContext
in interface GeneratedContext
public final GeneratedSourceContext getParentSourceContext()
getParentSourceContext
in interface GeneratedSourceContext
public final Set<MetaImportable> getImports()
getImports
in interface GeneratedSourceContext
public final void addImport(MetaImportable imp)
public final void addImport(Class c)
public final GeneratedPackage getPackage()
getPackage
in interface GeneratedSourceContext
getPackage
in interface MetaClass
public final GeneratedSourceFile getSourceFile()
getSourceFile
in interface GeneratedSourceContext
public String getImportPattern()
getImportPattern
in interface MetaImportable
public String getSimpleName()
getSimpleName
in interface GeneratedSourceContext
getSimpleName
in interface MetaClass
public String getQualifiedName()
getQualifiedName
in interface GeneratedSourceContext
getQualifiedName
in interface MetaClass
public String getPackageName()
getPackageName
in interface MetaClass
public MetaType getSuperClass()
getSuperClass
in interface MetaClass
public void setSuperClass(Class newSuperClass)
public void setSuperClass(MetaType newSuperClass)
public Collection<MetaType> getInterfaces()
getInterfaces
in interface MetaClass
public GeneratedClass getEnclosingClass()
getEnclosingClass
in interface MetaClass
getEnclosingClass
in class GeneratedMember
public void addTypeParameter(GeneratedTypeVariable var)
public List<GeneratedTypeVariable> getTypeParameters()
public final Collection<GeneratedClass> getClasses()
getClasses
in interface GeneratedContext
public Collection<GeneratedClass> getInnerClasses()
getInnerClasses
in interface MetaClass
protected Collection<GeneratedDeclaration> getOrderedMembers()
public Collection<GeneratedField> getFields()
public Collection<GeneratedConstructor> getConstructors()
getConstructors
in interface MetaClass
public Collection<GeneratedMethod> getMethods()
getMethods
in interface MetaClass
public void addInterface(MetaType metaInterface)
public void addInterface(Class metaInterface)
public GeneratedClass addInnerClass(int modifiers, String name, Class superClass)
public GeneratedEnum addEnum(int modifiers, String name)
addEnum
in interface GeneratedContext
public GeneratedEnum addInnerEnum(int modifiers, String name)
public GeneratedClass addClass(int modifiers, String name, MetaType superClass)
addClass
in interface GeneratedContext
public GeneratedClass addInnerClass(int modifiers, String name, MetaType superClass)
public GeneratedClass addInnerClass(int modifiers, String name)
public AnonymousClass addAnonymousClass(MetaType superClass)
public AnonymousClass addAnonymousClass(Class superClass)
public GeneratedField addField(int modifiers, Class type, String name)
public GeneratedField addField(int modifiers, MetaType type, String name)
public GeneratedConstructor addConstructor()
public GeneratedConstructor addConstructor(int modifiers)
public GeneratedMethod addMethod(int modifiers, Class returnType, String name)
public GeneratedMethod addMethod(int modifiers, MetaType returnType, String name)
public GeneratedBlock addBlock()
public GeneratedBlock addBlock(int modifiers)
@Deprecated public eu.bandm.tools.metajava.GeneratedDirt addDirt(Format format)
public Collection<GeneratedDeclaration> addDeclarations(String text)
public boolean isPrimitive()
isPrimitive
in interface MetaClass
public MetaClass getElementClass()
getElementClass
in interface MetaClass
public Format format()
format
in interface Formattable
public GeneratedClass getInnerClass(String name)
getInnerClass
in interface MetaClass
public GeneratedClass getInnerClass(Iterable<? extends String> name)
getInnerClass
in interface MetaClass
public final MetaClass getRawType()
getRawType
in interface MetaType
see also the complete user documentation .