ua.gradsoft.javachecker.models
Class JavaTermEnumModel

java.lang.Object
  extended by ua.gradsoft.javachecker.models.JavaTypeModel
      extended by ua.gradsoft.javachecker.models.JavaTermTypeAbstractModel
          extended by ua.gradsoft.javachecker.models.JavaTermEnumModel
All Implemented Interfaces:
AttributedEntity

public class JavaTermEnumModel
extends JavaTermTypeAbstractModel

Model of Enum definition.


Nested Class Summary
 class JavaTermEnumModel.ValueOfMethodModel
           
 class JavaTermEnumModel.ValuesMethodModel
           
 
Field Summary
static int ENUMBODY_TERM_INDEX
           
static int IDENTIFIER_TERM_INDEX
           
static int IMPLEMENTS_TERM_INDEX
           
 
Fields inherited from class ua.gradsoft.javachecker.models.JavaTermTypeAbstractModel
checkerComment_, constructors_, fieldModels_, initializers_, isAnonimous_, methodModels_, name_, nestedTypes_, parentType_, resolvedSuperClass_, resolvedSuperInterfaces_, statement_, superClassTerm_, superInterfacesTerms_, t_, typeVariables_
 
Method Summary
 boolean containsConstant(java.lang.String name)
           
 java.util.Set<java.lang.String> getConstantNames()
           
 JavaAnnotationInstanceModel getDefaultAnnotationInstanceModel()
          if this is annotation, get annotation instance model, otherwise return null;
 JavaTermExpressionModel getDefaultInitializerExpression()
           
 java.util.Map<java.lang.String,JavaEnumConstantModel> getEnumConstantModels()
          get map of enum constants.
 Term getModelTerm()
          EnumModel(modifiers,identifier,superInterfaces, enumConstantsList,membersList,context)
 JavaTypeModel getSuperClass()
          get superclass.
 boolean hasTypeParameters()
          if this type hase type parameters ?
 boolean isAnnotationType()
           
 boolean isClass()
           
 boolean isEnum()
           
 boolean isInterface()
           
 
Methods inherited from class ua.gradsoft.javachecker.models.JavaTermTypeAbstractModel
addClassOrInterfaceDeclaration, addConstructorDeclaration, addEnumDeclaration, addFieldDeclaration, addInitializer, addMethodDeclaration, addSuperClass, addSuperInterface, addTypeParameter, getAnnotationsMap, getASTTerm, getCheckerComment, getConstructorModels, getDisabledChecks, getEnclosedStatement, getEnclosedType, getErasedName, getFullNameAsTerm, getInitializerModels, getLastAnonimousTypeIndex, getLastLocalTypeIndex, getMemberModelsList, getMemberVariableModels, getMethodModels, getModifiersModel, getName, getNestedTypeModels, getReferencedType, getShortNameAsTerm, getSuperInterfaces, getTerm, getTypeParameters, getTypeParametersModel, hasASTTerm, hasMemberVariableModels, hasMethodModels, hasNestedTypeModels, isAnonimous, isArray, isLocal, isNested, isNull, isPrimitiveType, isTypeVariable, isUnknown, isWildcardBounds, setUnitModel
 
Methods inherited from class ua.gradsoft.javachecker.models.JavaTypeModel
findMemberVariableModel, findMethodModels, findNestedTypeModel, getAnnotation, getAttribute, getAttributes, getAttributesData, getCanonicalName, getChildAttributes, getErasedFullName, getFullName, getJavaFacts, getPackageModel, getUnitModel, hasAnnotation, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IDENTIFIER_TERM_INDEX

public static final int IDENTIFIER_TERM_INDEX
See Also:
Constant Field Values

IMPLEMENTS_TERM_INDEX

public static final int IMPLEMENTS_TERM_INDEX
See Also:
Constant Field Values

ENUMBODY_TERM_INDEX

public static final int ENUMBODY_TERM_INDEX
See Also:
Constant Field Values
Method Detail

isClass

public boolean isClass()
Specified by:
isClass in class JavaTypeModel

isInterface

public boolean isInterface()
Specified by:
isInterface in class JavaTypeModel

isEnum

public boolean isEnum()
Specified by:
isEnum in class JavaTypeModel

isAnnotationType

public boolean isAnnotationType()
Specified by:
isAnnotationType in class JavaTypeModel

hasTypeParameters

public boolean hasTypeParameters()
Description copied from class: JavaTypeModel
if this type hase type parameters ?

Specified by:
hasTypeParameters in class JavaTypeModel

containsConstant

public boolean containsConstant(java.lang.String name)

getConstantNames

public java.util.Set<java.lang.String> getConstantNames()

getEnumConstantModels

public java.util.Map<java.lang.String,JavaEnumConstantModel> getEnumConstantModels()
get map of enum constants.

Specified by:
getEnumConstantModels in class JavaTypeModel

getDefaultAnnotationInstanceModel

public JavaAnnotationInstanceModel getDefaultAnnotationInstanceModel()
Description copied from class: JavaTypeModel
if this is annotation, get annotation instance model, otherwise return null;

Specified by:
getDefaultAnnotationInstanceModel in class JavaTypeModel
Returns:
null

getDefaultInitializerExpression

public JavaTermExpressionModel getDefaultInitializerExpression()
                                                        throws TermWareException
Specified by:
getDefaultInitializerExpression in class JavaTypeModel
Returns:
default initializer erxpression, if entity is not initialized. (i.e. null for complex types, and so on)
Throws:
TermWareException

getModelTerm

public Term getModelTerm()
                  throws TermWareException,
                         EntityNotFoundException
EnumModel(modifiers,identifier,superInterfaces, enumConstantsList,membersList,context)

Specified by:
getModelTerm in class JavaTypeModel
Throws:
TermWareException
EntityNotFoundException

getSuperClass

public JavaTypeModel getSuperClass()
                            throws TermWareException
Description copied from class: JavaTypeModel
get superclass. does not supported for primitive types, type arguments, wildcard bounds

Overrides:
getSuperClass in class JavaTermTypeAbstractModel
Throws:
TermWareException