public class EnumClassDeclaration extends ClassDeclaration
In addition the programvariables that represent enum constants are memorized. Thus this class is able to have queries on the enum constants.
extending, implementing, isAnonymousClass, isInnerClass, isLocalClass
fullName, isLibrary, members, name, parentIsInterfaceDeclaration
modArray
Constructor and Description |
---|
EnumClassDeclaration(ExtList children,
ProgramElementName fullName,
boolean isLibrary,
java.util.List<EnumConstantDeclaration> enumConstantDeclarations)
create a new EnumClassDeclaration that describes an enum defintion.
|
Modifier and Type | Method and Description |
---|---|
int |
getNumberOfConstants()
get the number of defined enum constants in this type.
|
static int |
indexOf(ProgramVariable attribute) |
static boolean |
isEnumConstant(IProgramVariable attribute)
check whether a PV is an enum constant of any enum type.
|
getChildAt, getChildCount, getExtendedTypes, getImplementedTypes, getSupertypes, isAnonymousClass, isInnerClass, isInterface, isLocalClass, isStrictFp, isTransient, isVolatile, prettyPrint, visit
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, isStatic
getModifiers, getStateCount, getVisibilityModifier, isGhost, isModel, isNative, isSynchronized
compatibleBlockSize, computeHashCode, equalsModRenaming, getArrayPos, match, matchChildren
getComments, hashCode, prettyPrintMain, reuseSignature
getEndPosition, getFirstElementIncludingBlocks, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComments, match
equalsModRenaming, getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getLastElement, getPositionInfo, getRelativePosition, getStartPosition
getModifiers
public EnumClassDeclaration(ExtList children, ProgramElementName fullName, boolean isLibrary, java.util.List<EnumConstantDeclaration> enumConstantDeclarations)
children
- children in the ast (members)fullName
- of the class/enumisLibrary
- see class constructorenumConstantDeclarations
- the declarations for the enum constantspublic int getNumberOfConstants()
public static boolean isEnumConstant(IProgramVariable attribute)
attribute
- ProgramVariable to check.public static int indexOf(ProgramVariable attribute)
Copyright © 2003-2019 The KeY-Project.