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(java.lang.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.
|
java.lang.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
|
java.lang.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, isVolatile
compatibleBlockSize, computeHashCode, equalsModRenaming, getArrayPos, match, matchChildren
getComments, hashCode, prettyPrint, prettyPrintMain, reuseSignature
getEndPosition, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getModifiers
isInterface
getChildAt, getChildCount
getComments, match
equalsModRenaming, getEndPosition, getFirstElementIncludingBlocks, getPositionInfo, getRelativePosition, getStartPosition, prettyPrint, visit
protected 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()
JavaSourceElement
getFirstElement
in interface SourceElement
getFirstElement
in class JavaSourceElement
JavaSourceElement.toSource()
,
JavaSourceElement.getStartPosition()
public SourceElement getLastElement()
JavaSourceElement
getLastElement
in interface SourceElement
getLastElement
in class JavaSourceElement
JavaSourceElement.toSource()
,
JavaSourceElement.getEndPosition()
public final java.lang.String getName()
getName
in interface NamedModelElement
public java.lang.String getFullName()
ProgramModelElement
getFullName
in interface ProgramModelElement
public Literal getDefaultValue()
getDefaultValue
in interface Type
public ProgramElementName getProgramElementName()
getProgramElementName
in interface NamedProgramElement
public ImmutableArray<MemberDeclaration> getMembers()
public boolean isLibraryClass()
public abstract ImmutableList<KeYJavaType> getSupertypes()
getSupertypes
in interface ClassType
public ImmutableList<ClassType> getAllSupertypes(Services services)
getAllSupertypes
in interface ClassType
public ImmutableList<Field> getFields(Services services)
public ImmutableList<Field> getAllFields(Services services)
getAllFields
in interface ClassType
public ImmutableList<Method> getMethods(Services services)
getMethods
in interface ClassType
public ImmutableList<Method> getAllMethods(Services services)
getAllMethods
in interface ClassType
public ImmutableList<Constructor> getConstructors(Services services)
getConstructors
in interface ClassType
public ImmutableList<ClassType> getTypes(Services services)
public ImmutableList<ClassType> getAllTypes(Services services)
getAllTypes
in interface ClassType
ClassType.getAllSupertypes(de.uka.ilkd.key.java.Services)
public int getTypeDeclarationCount()
getTypeDeclarationCount
in interface TypeDeclarationContainer
public TypeDeclaration getTypeDeclarationAt(int index)
getTypeDeclarationAt
in interface TypeDeclarationContainer
public boolean isFinal()
isFinal
in interface Member
isFinal
in class JavaDeclaration
true
if this member is final,
false
otherwise.public boolean isPrivate()
isPrivate
in interface Member
isPrivate
in interface MemberDeclaration
isPrivate
in class JavaDeclaration
true
if this member is private,
false
otherwise.public boolean isProtected()
isProtected
in interface Member
isProtected
in interface MemberDeclaration
isProtected
in class JavaDeclaration
true
if this member is protected,
false
otherwise.public boolean isPublic()
isPublic
in interface Member
isPublic
in interface MemberDeclaration
isPublic
in class JavaDeclaration
true
if this member is public,
false
otherwise.public boolean isStatic()
isStatic
in interface Member
isStatic
in interface MemberDeclaration
isStatic
in class JavaDeclaration
true
if this member is static,
false
otherwise.public boolean isStrictFp()
isStrictFp
in interface Member
isStrictFp
in interface MemberDeclaration
isStrictFp
in class JavaDeclaration
true
if this member is strictfp,
false
otherwise.public boolean isAbstract()
isAbstract
in interface ClassType
isAbstract
in class JavaDeclaration
true
if this member is abstract,
false
otherwise.ClassType.isInterface()
public boolean equals(java.lang.Object o)
equals
in class JavaNonTerminalProgramElement