ua.gradsoft.javachecker.models
Class JavaTermEnumAnonimousTypeModel

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

public class JavaTermEnumAnonimousTypeModel
extends JavaTermTypeAbstractModel

Model for type, which represent anonimous subtype of enum.

Author:
Ruslan Shevchenko

Field Summary
 
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_
 
Constructor Summary
JavaTermEnumAnonimousTypeModel(java.lang.String constantName, Term body, JavaTermEnumModel owner)
           
 
Method Summary
 JavaAnnotationInstanceModel getDefaultAnnotationInstanceModel()
          if this is annotation, get annotation instance model, otherwise return null;
 JavaExpressionModel getDefaultInitializerExpression()
           
 java.util.Map<java.lang.String,JavaEnumConstantModel> getEnumConstantModels()
          key of return values are names of enum constants.
 Term getModelTerm()
          EnumAnonimousTypeModel(identifier,membersList,context)
 boolean hasTypeParameters()
          if this type hase type parameters ?
 boolean isAnnotationType()
          return false
 boolean isAnonimous()
          true, if this is anonimous type.
 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, getSuperClass, getSuperInterfaces, getTerm, getTypeParameters, getTypeParametersModel, hasASTTerm, hasMemberVariableModels, hasMethodModels, hasNestedTypeModels, 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
 

Constructor Detail

JavaTermEnumAnonimousTypeModel

public JavaTermEnumAnonimousTypeModel(java.lang.String constantName,
                                      Term body,
                                      JavaTermEnumModel owner)
                               throws TermWareException
Throws:
TermWareException
Method Detail

isAnnotationType

public boolean isAnnotationType()
return false

Specified by:
isAnnotationType 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

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

isAnonimous

public boolean isAnonimous()
Description copied from class: JavaTypeModel
true, if this is anonimous type.

Overrides:
isAnonimous in class JavaTermTypeAbstractModel

hasTypeParameters

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

Specified by:
hasTypeParameters in class JavaTypeModel

getEnumConstantModels

public java.util.Map<java.lang.String,JavaEnumConstantModel> getEnumConstantModels()
Description copied from class: JavaTypeModel
key of return values are names of enum constants. When type is not enum - return empty map.

Specified by:
getEnumConstantModels in class JavaTypeModel

getModelTerm

public Term getModelTerm()
                  throws TermWareException,
                         EntityNotFoundException
EnumAnonimousTypeModel(identifier,membersList,context)

Specified by:
getModelTerm in class JavaTypeModel
Throws:
TermWareException
EntityNotFoundException

getDefaultInitializerExpression

public JavaExpressionModel getDefaultInitializerExpression()
                                                    throws TermWareException,
                                                           EntityNotFoundException
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
EntityNotFoundException