public abstract class TypeDeclaration extends JavaDeclaration implements NamedProgramElement, MemberDeclaration, TypeDeclarationContainer, ClassType, VariableScope, TypeScope
| Modifier and Type | Field and Description |
|---|---|
protected ProgramElementName |
fullName |
protected boolean |
isLibrary |
protected ImmutableArray<MemberDeclaration> |
members |
protected ProgramElementName |
name |
protected boolean |
parentIsInterfaceDeclaration |
modArray| Constructor and Description |
|---|
TypeDeclaration() |
TypeDeclaration(ExtList children,
ProgramElementName fullName,
boolean isLibrary) |
TypeDeclaration(ExtList children,
ProgramElementName name,
ProgramElementName fullName,
boolean isLibrary) |
TypeDeclaration(Modifier[] mods,
ProgramElementName name,
ProgramElementName fullName,
MemberDeclaration[] members,
boolean parentIsInterfaceDeclaration,
boolean isLibrary)
Type declaration.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
ImmutableList<Field> |
getAllFields(Services services)
[dlohner] The given parameter is obsolete with this implementation.
|
ImmutableList<Method> |
getAllMethods(Services services)
TO BE IMPLEMENTED
|
ImmutableList<ClassType> |
getAllSupertypes(Services services)
TO BE IMPLEMENTED
|
ImmutableList<ClassType> |
getAllTypes(Services services)
TO BE IMPLEMENTED
|
ImmutableList<Constructor> |
getConstructors(Services services)
TO BE IMPLEMENTED
|
Literal |
getDefaultValue()
returns the default value of the given type
according to JLS 4.5.5
|
ImmutableList<Field> |
getFields(Services services)
TO BE IMPLEMENTED
|
SourceElement |
getFirstElement()
Finds the source element that occurs first in the source.
|
String |
getFullName()
Returns the maximal expanded name including all applicable
qualifiers.
|
SourceElement |
getLastElement()
Finds the source element that occurs last in the source.
|
ImmutableArray<MemberDeclaration> |
getMembers()
Get members.
|
ImmutableList<Method> |
getMethods(Services services)
TO BE IMPLEMENTED
|
String |
getName()
Get name.
|
Package |
getPackage(Services s)
TO BE IMPLEMENTED
|
ProgramElementName |
getProgramElementName()
Get ProgramElementName.
|
abstract ImmutableList<KeYJavaType> |
getSupertypes()
returns the local declared supertypes
|
TypeDeclaration |
getTypeDeclarationAt(int index) |
int |
getTypeDeclarationCount()
Get the number of type declarations in this container.
|
ImmutableList<ClassType> |
getTypes(Services services)
TO BE IMPLEMENTED
|
boolean |
isAbstract()
Test whether the declaration is abstract.
|
boolean |
isFinal()
Test whether the declaration is final.
|
boolean |
isLibraryClass() |
boolean |
isPrivate()
Test whether the declaration is private.
|
boolean |
isProtected()
Test whether the declaration is protected.
|
boolean |
isPublic()
Test whether the declaration is public.
|
boolean |
isStatic()
Test whether the declaration is static.
|
boolean |
isStrictFp()
Test whether the declaration is strictfp.
|
getModifiers, getStateCount, getVisibilityModifier, isGhost, isModel, isNative, isSynchronized, isTransient, isVolatilecompatibleBlockSize, equalsModRenaming, getArrayPos, hashCode, match, matchChildrengetComments, prettyPrint, prettyPrintMain, reuseSignaturegetEndPosition, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetModifiersisInterfacegetChildAt, getChildCountgetComments, matchequalsModRenaming, getEndPosition, getFirstElementIncludingBlocks, getPositionInfo, getRelativePosition, getStartPosition, prettyPrint, visitprotected final ProgramElementName name
protected final ProgramElementName fullName
protected final ImmutableArray<MemberDeclaration> members
protected final boolean parentIsInterfaceDeclaration
protected final boolean isLibrary
public TypeDeclaration()
public TypeDeclaration(Modifier[] mods, ProgramElementName name, ProgramElementName fullName, MemberDeclaration[] members, boolean parentIsInterfaceDeclaration, boolean isLibrary)
mods - a modifier array.name - ProgramElementName of the typemembers - an array containing the memberdeclarations of
this typepublic TypeDeclaration(ExtList children, ProgramElementName name, ProgramElementName fullName, boolean isLibrary)
children - an ExtList of children.name - the ProgramElementName of the type
May contain:
several MemberDeclaration (as members of the type),
a parentIsInterfaceDeclaration (indicating if parent is interface),
several Modifier (as modifiers of the type decl),
Commentspublic TypeDeclaration(ExtList children, ProgramElementName fullName, boolean isLibrary)
children - an ExtList of children.
May contain:
a 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),
Commentspublic SourceElement getFirstElement()
JavaSourceElementgetFirstElement in interface SourceElementgetFirstElement in class JavaSourceElementJavaSourceElement.toSource(),
JavaSourceElement.getStartPosition()public SourceElement getLastElement()
JavaSourceElementgetLastElement in interface SourceElementgetLastElement in class JavaSourceElementJavaSourceElement.toSource(),
JavaSourceElement.getEndPosition()public final String getName()
getName in interface NamedModelElementpublic String getFullName()
ProgramModelElementgetFullName in interface ProgramModelElementpublic Literal getDefaultValue()
getDefaultValue in interface Typepublic ProgramElementName getProgramElementName()
getProgramElementName in interface NamedProgramElementpublic ImmutableArray<MemberDeclaration> getMembers()
public boolean isLibraryClass()
public abstract ImmutableList<KeYJavaType> getSupertypes()
getSupertypes in interface ClassTypepublic ImmutableList<ClassType> getAllSupertypes(Services services)
getAllSupertypes in interface ClassTypepublic ImmutableList<Field> getFields(Services services)
public ImmutableList<Field> getAllFields(Services services)
getAllFields in interface ClassTypepublic ImmutableList<Method> getMethods(Services services)
getMethods in interface ClassTypepublic ImmutableList<Method> getAllMethods(Services services)
getAllMethods in interface ClassTypepublic ImmutableList<Constructor> getConstructors(Services services)
getConstructors in interface ClassTypepublic ImmutableList<ClassType> getTypes(Services services)
public ImmutableList<ClassType> getAllTypes(Services services)
getAllTypes in interface ClassTypeClassType.getAllSupertypes(de.uka.ilkd.key.java.Services)public int getTypeDeclarationCount()
getTypeDeclarationCount in interface TypeDeclarationContainerpublic TypeDeclaration getTypeDeclarationAt(int index)
getTypeDeclarationAt in interface TypeDeclarationContainerpublic boolean isFinal()
isFinal in interface MemberisFinal in class JavaDeclarationtrue if this member is final,
false otherwise.public boolean isPrivate()
isPrivate in interface MemberisPrivate in interface MemberDeclarationisPrivate in class JavaDeclarationtrue if this member is private,
false otherwise.public boolean isProtected()
isProtected in interface MemberisProtected in interface MemberDeclarationisProtected in class JavaDeclarationtrue if this member is protected,
false otherwise.public boolean isPublic()
isPublic in interface MemberisPublic in interface MemberDeclarationisPublic in class JavaDeclarationtrue if this member is public,
false otherwise.public boolean isStatic()
isStatic in interface MemberisStatic in interface MemberDeclarationisStatic in class JavaDeclarationtrue if this member is static,
false otherwise.public boolean isStrictFp()
isStrictFp in interface MemberisStrictFp in interface MemberDeclarationisStrictFp in class JavaDeclarationtrue if this member is strictfp,
false otherwise.public boolean isAbstract()
isAbstract in interface ClassTypeisAbstract in class JavaDeclarationtrue if this member is abstract,
false otherwise.ClassType.isInterface()public boolean equals(Object o)
equals in class JavaNonTerminalProgramElement