org.inxar.jenesis
Interface ClassDeclaration

All Superinterfaces:
Access, Codeable, Declaration, Member, TypeDeclaration
All Known Subinterfaces:
InnerClass, LocalClass, NewAnonymousClass, PackageClass

public interface ClassDeclaration
extends TypeDeclaration

Declaration subinterface for the class declaration heirarchy.


Fields inherited from interface org.inxar.jenesis.Access
PACKAGE, PRIVATE, PROTECTED, PUBLIC
 
Method Summary
 void addImplements(java.lang.String type)
          Adds the given string to the list of implements clauses.
 Iterator getConstructors()
          Gets the list of constructors as an iterator of Constructor.
 java.lang.String getExtends()
          Gets the extends clause.
 Iterator getFields()
          Gets the list of fields as an iterator of ClassField.
 Iterator getImplements()
          Gets the list of implementation clauses as an iterator of String.
 Iterator getInnerClasses()
          Gets the list of inner classes as an iterator of InnerClass.
 Iterator getMethods()
          Gets the list of method as an iterator of ClassMethod.
 Iterator getStaticInitializers()
          Gets the list of static initializers as an iterator of StaticInitializer.
 boolean isAbstract()
          Getter method for the isAbstract flag.
 void isAbstract(boolean value)
          Setter method for the isAbstract flag.
 Constructor newConstructor()
          Creates a new constructor in this class
 ClassField newField(Type type, java.lang.String name)
          Creates a new field in this class with the given type and name.
 InnerClass newInnerClass(java.lang.String name)
          Creates a new inner class in this class.
 ClassMethod newMethod(Type type, java.lang.String name)
          Creates a new method in this class with the given type and name.
 StaticInitializer newStaticInitializer()
          Creates a new static initialization block in this class
 void setExtends(java.lang.String type)
          Sets the extends clause to the given string.
 
Methods inherited from interface org.inxar.jenesis.TypeDeclaration
getMembers, getUnit, load
 
Methods inherited from interface org.inxar.jenesis.Member
getName, isFinal, isFinal, isStatic, isStatic, setName
 
Methods inherited from interface org.inxar.jenesis.Access
getAccess, setAccess
 
Methods inherited from interface org.inxar.jenesis.Declaration
javadoc
 
Methods inherited from interface org.inxar.jenesis.Codeable
getComment, setComment, toCode, vm
 

Method Detail

isAbstract

public void isAbstract(boolean value)
Setter method for the isAbstract flag.

isAbstract

public boolean isAbstract()
Getter method for the isAbstract flag.

setExtends

public void setExtends(java.lang.String type)
Sets the extends clause to the given string. A class can extend only one type.

getExtends

public java.lang.String getExtends()
Gets the extends clause.

getImplements

public Iterator getImplements()
Gets the list of implementation clauses as an iterator of String.

addImplements

public void addImplements(java.lang.String type)
Adds the given string to the list of implements clauses.

getConstructors

public Iterator getConstructors()
Gets the list of constructors as an iterator of Constructor.

getStaticInitializers

public Iterator getStaticInitializers()
Gets the list of static initializers as an iterator of StaticInitializer.

newStaticInitializer

public StaticInitializer newStaticInitializer()
Creates a new static initialization block in this class

newConstructor

public Constructor newConstructor()
Creates a new constructor in this class

getInnerClasses

public Iterator getInnerClasses()
Gets the list of inner classes as an iterator of InnerClass.

newInnerClass

public InnerClass newInnerClass(java.lang.String name)
Creates a new inner class in this class.

newField

public ClassField newField(Type type,
                           java.lang.String name)
Creates a new field in this class with the given type and name.

getFields

public Iterator getFields()
Gets the list of fields as an iterator of ClassField.

newMethod

public ClassMethod newMethod(Type type,
                             java.lang.String name)
Creates a new method in this class with the given type and name.

getMethods

public Iterator getMethods()
Gets the list of method as an iterator of ClassMethod.