public class ClassDeclaration extends TypeDeclaration implements Statement
| Modifier and Type | Field and Description | 
|---|---|
protected Extends | 
extending  | 
protected Implements | 
implementing  | 
protected boolean | 
isAnonymousClass  | 
protected boolean | 
isInnerClass  | 
protected boolean | 
isLocalClass  | 
fullName, isLibrary, members, name, parentIsInterfaceDeclarationmodArray| Constructor and Description | 
|---|
ClassDeclaration(ExtList children,
                ProgramElementName fullName,
                boolean isLibrary)  | 
ClassDeclaration(ExtList children,
                ProgramElementName fullName,
                boolean isLibrary,
                boolean innerClass,
                boolean anonymousClass,
                boolean localClass)
uses children list to create non-anonymous class 
 | 
ClassDeclaration(Modifier[] mods,
                ProgramElementName name,
                Extends extended,
                ProgramElementName fullName,
                Implements implemented,
                MemberDeclaration[] members,
                boolean parentIsInterfaceDeclaration,
                boolean isLibrary)
Class declaration. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
ProgramElement | 
getChildAt(int index)
Returns the child at the specified index in this node's "virtual"
 child array 
 | 
int | 
getChildCount()
Returns the number of children of this node. 
 | 
Extends | 
getExtendedTypes()
Get extended types. 
 | 
Implements | 
getImplementedTypes()
Get implemented types. 
 | 
ImmutableList<KeYJavaType> | 
getSupertypes()
returns the local declared supertypes 
 | 
boolean | 
isAnonymousClass()  | 
boolean | 
isInnerClass()  | 
boolean | 
isInterface()
Checks if this class type denotes an interface. 
 | 
boolean | 
isLocalClass()  | 
boolean | 
isStrictFp()
Classes are never strictfp. 
 | 
boolean | 
isTransient()
Classes are never transient. 
 | 
boolean | 
isVolatile()
Classes are never volatile. 
 | 
void | 
prettyPrint(PrettyPrinter p)
Pretty printing the source element. 
 | 
void | 
visit(Visitor v)
calls the corresponding method of a visitor in order to
 perform some action/transformation on this element 
 | 
equals, getAllFields, getAllMethods, getAllSupertypes, getAllTypes, getConstructors, getDefaultValue, getFields, getFirstElement, getFullName, getLastElement, getMembers, getMethods, getName, getPackage, getProgramElementName, getTypeDeclarationAt, getTypeDeclarationCount, getTypes, isAbstract, isFinal, isLibraryClass, isPrivate, isProtected, isPublic, isStaticgetModifiers, getStateCount, getVisibilityModifier, isGhost, isModel, isNative, isSynchronizedcompatibleBlockSize, computeHashCode, equalsModRenaming, getArrayPos, match, matchChildrengetComments, hashCode, prettyPrintMain, reuseSignaturegetEndPosition, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetComments, matchequalsModRenaming, getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getLastElement, getPositionInfo, getRelativePosition, getStartPositiongetModifiersprotected final Extends extending
protected final Implements implementing
protected final boolean isInnerClass
protected final boolean isLocalClass
protected final boolean isAnonymousClass
public ClassDeclaration(Modifier[] mods, ProgramElementName name, Extends extended, ProgramElementName fullName, Implements implemented, MemberDeclaration[] members, boolean parentIsInterfaceDeclaration, boolean isLibrary)
mods - a modifier array.name - Identifier of the classmembers - an array containing the memberdeclarations of
 this typeimplemented - of type Implement containing the
 interfaces implemented by this classextended - Extend containing the class extended by
 the class of this classdeclarationparentIsInterfaceDeclaration - boolean true iff
 parent is an InterfaceDeclarationpublic ClassDeclaration(ExtList children, ProgramElementName fullName, boolean isLibrary, boolean innerClass, boolean anonymousClass, boolean localClass)
children - the ExtList with all children building up this
  class declaration
 May contain: a Extends (as pointer to a
 class), a Implements (as pointer to an interface)
 ProgramElementName (as name), several MemberDeclaration (as members of
 the type), a parentIsInterfaceDeclaration (indicating if parent is
 interface), several Modifier (as modifiers of the type decl), a CommentfullName - the fully qualified ProgramElementName of this classisLibrary - a boolean flag indicating if this class represents a 
 library class (such classes have usually no method implementations but 
 specifications)public ClassDeclaration(ExtList children, ProgramElementName fullName, boolean isLibrary)
public int getChildCount()
getChildCount in interface NonTerminalProgramElementpublic ProgramElement getChildAt(int index)
getChildAt in interface NonTerminalProgramElementindex - an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException - if index is out
            of boundspublic Extends getExtendedTypes()
public Implements getImplementedTypes()
public boolean isStrictFp()
isStrictFp in interface MemberisStrictFp in interface MemberDeclarationisStrictFp in class TypeDeclarationtrue if this member is strictfp,
       false otherwise.public boolean isTransient()
isTransient in class JavaDeclarationpublic boolean isInnerClass()
public boolean isAnonymousClass()
public boolean isLocalClass()
public boolean isVolatile()
isVolatile in class JavaDeclarationpublic boolean isInterface()
ClassTypeisInterface in interface ClassTypetrue if this object represents an interface,
       false if it is an ordinary class.public ImmutableList<KeYJavaType> getSupertypes()
getSupertypes in interface ClassTypegetSupertypes in class TypeDeclarationpublic void visit(Visitor v)
visit in interface SourceElementv - the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElementprettyPrint in interface SourceElementprettyPrint in class JavaProgramElementp - a pretty printer.java.io.IOException - occasionally thrown.