| de.uka.ilkd.key.java.declaration.JavaDeclaration de.uka.ilkd.key.java.declaration.TypeDeclaration de.uka.ilkd.key.java.declaration.ClassDeclaration
ClassDeclaration | public class ClassDeclaration extends TypeDeclaration implements Statement(Code) | | There are several types of class declarations:
- package-less outer classes
- getClassContainer() == null
- getStatementContainer() == null
- getName() != null
- ordinary outer classes
- getClassContainer() instanceof Package
- getStatementContainer() == null
- getName() != null
- member classes
- getClassContainer() instanceof ClassDeclaration
- getStatementContainer() == null
- getName() != null
- local class
- getClassContainer() == null
- getStatementContainer() != null
- getName() != null
- local anonymous class
- getClassContainer() == null
- getStatementContainer() instanceof expression.New
- getName() == null
Anonymous local classes have exactly one supertype and no
subtypes.
Binary classes may have only binary members.
taken from COMPOST and changed to achieve an immutable structure
|
Constructor Summary | |
public | ClassDeclaration(Modifier[] mods, ProgramElementName name, Extends extended, ProgramElementName fullName, Implements implemented, MemberDeclaration[] members, boolean parentIsInterfaceDeclaration, boolean isLibrary) Class declaration. | public | ClassDeclaration(ExtList children, ProgramElementName fullName, boolean isLibrary) | public | ClassDeclaration(ProgramElementName name, ProgramElementName fullName) |
ClassDeclaration | public ClassDeclaration(Modifier[] mods, ProgramElementName name, Extends extended, ProgramElementName fullName, Implements implemented, MemberDeclaration[] members, boolean parentIsInterfaceDeclaration, boolean isLibrary)(Code) | | Class declaration.
Parameters: mods - a modifier array. Parameters: name - Identifier of the class Parameters: members - an array containing the memberdeclarations ofthis type Parameters: implemented - of type Implement containing theinterfaces implemented by this class Parameters: extended - Extend containing the class extended bythe class of this classdeclaration Parameters: parentIsInterfaceDeclaration - boolean true iffparent is an InterfaceDeclaration |
ClassDeclaration | public ClassDeclaration(ExtList children, ProgramElementName fullName, boolean isLibrary)(Code) | | uses children list to create non-anonymous class
Parameters: children - the ExtList with all children building up thisclass declarationMay contain: a Extends (as pointer to aclass), a Implements (as pointer to an interface)ProgramElementName (as name), several MemberDeclaration (as members ofthe type), a parentIsInterfaceDeclaration (indicating if parent isinterface), several Modifier (as modifiers of the type decl), a Comment Parameters: fullName - the fully qualified ProgramElementName of this class Parameters: isLibrary - a boolean flag indicating if this class represents a library class (such classes have usually no method implementations but specifications) |
getChildAt | public ProgramElement getChildAt(int index)(Code) | | Returns the child at the specified index in this node's "virtual"
child array
Parameters: index - an index into this node's "virtual" child array the program element at the given position exception: ArrayIndexOutOfBoundsException - if index is outof bounds |
getChildCount | public int getChildCount()(Code) | | Returns the number of children of this node.
an int giving the number of children of this node |
getComments | public Comment[] getComments()(Code) | | returns the comments belonging to this ClassDeclaration + Comments
declared in the body of the class that contain jml invariant or
constraint statements.
the comments. |
getExtendedTypes | public Extends getExtendedTypes()(Code) | | Get extended types.
the extends. |
getImplementedTypes | public Implements getImplementedTypes()(Code) | | Get implemented types.
the implements. |
getSupertypes | public ListOfKeYJavaType getSupertypes()(Code) | | returns the local declared supertypes
|
isInterface | public boolean isInterface()(Code) | | |
isStrictFp | public boolean isStrictFp()(Code) | | Classes are never strictfp.
|
isTransient | public boolean isTransient()(Code) | | Classes are never transient.
|
isVolatile | public boolean isVolatile()(Code) | | Classes are never volatile.
|
visit | public void visit(Visitor v)(Code) | | calls the corresponding method of a visitor in order to
perform some action/transformation on this element
Parameters: v - the Visitor |
Fields inherited from de.uka.ilkd.key.java.declaration.JavaDeclaration | final protected ArrayOfModifier modArray(Code)(Java Doc)
|
|
|