ua.gradsoft.javachecker.models
Class JavaTermAnnotationMethodModel

java.lang.Object
  extended by ua.gradsoft.javachecker.models.JavaMethodModel
      extended by ua.gradsoft.javachecker.models.JavaTermAnnotationMethodModel
All Implemented Interfaces:
AttributedEntity, JavaTopLevelBlockOwnerModel

public class JavaTermAnnotationMethodModel
extends JavaMethodModel

Annotation element.

Author:
Ruslan Shevchenko

Constructor Summary
JavaTermAnnotationMethodModel(JavaTypeModel typeModel, Term modifiers, Term typeTerm, Term identifierTerm, Term defaultValueTerm)
          create annotation field.
 
Method Summary
 java.util.Map<java.lang.String,JavaAnnotationInstanceModel> getAnnotationsMap()
          get Map of annotation.
 JavaExpressionModel getDefaultValue()
          return default value of method.
 java.util.List<JavaFormalParameterModel> getFormalParametersList()
          get list of formal parameters.
 java.util.Map<java.lang.String,JavaFormalParameterModel> getFormalParametersMap()
          get map of formal parameters.
 java.util.List<JavaTypeModel> getFormalParametersTypes()
          return list of forma-parameters types.
 Term getModelTerm()
          AnnotationMethodModel(modifiers,name,type,defaultValue, context)
 JavaTermModifiersModel getModifiers()
           
 java.lang.String getName()
          get name of method.
 JavaTypeModel getResultType()
           
 java.util.List<JavaTypeModel> getThrowsList()
          get List of throwed types in trows specification.
 JavaTopLevelBlockModel getTopLevelBlockModel()
          return block model, if storing of block model is supported, otherwise throws NotSupportedException
 java.util.List<JavaTypeVariableAbstractModel> getTypeParameters()
           
 boolean hasDefaultValue()
          If method has default value
 boolean isSupportBlockModel()
          return true if storing of block model is supported, otherwise false.
 boolean isSynthetic()
          true for synthetic
 
Methods inherited from class ua.gradsoft.javachecker.models.JavaMethodModel
getAttribute, getChildAttributes, getJavaFacts, getTypeModel, print, printErasedSignature, printSignature, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaTermAnnotationMethodModel

public JavaTermAnnotationMethodModel(JavaTypeModel typeModel,
                                     Term modifiers,
                                     Term typeTerm,
                                     Term identifierTerm,
                                     Term defaultValueTerm)
                              throws TermWareException
create annotation field.

Throws:
TermWareException
Method Detail

getName

public java.lang.String getName()
Description copied from class: JavaMethodModel
get name of method.

Specified by:
getName in interface JavaTopLevelBlockOwnerModel
Specified by:
getName in class JavaMethodModel
Returns:
method name

getModifiers

public JavaTermModifiersModel getModifiers()
Specified by:
getModifiers in class JavaMethodModel

getTypeParameters

public java.util.List<JavaTypeVariableAbstractModel> getTypeParameters()
                                                                throws TermWareException
Specified by:
getTypeParameters in interface JavaTopLevelBlockOwnerModel
Specified by:
getTypeParameters in class JavaMethodModel
Throws:
TermWareException

getResultType

public JavaTypeModel getResultType()
                            throws TermWareException
Specified by:
getResultType in class JavaMethodModel
Throws:
TermWareException

getFormalParametersTypes

public java.util.List<JavaTypeModel> getFormalParametersTypes()
Description copied from class: JavaMethodModel
return list of forma-parameters types. Note, that type for varargs parameters are arrays.

Specified by:
getFormalParametersTypes in class JavaMethodModel

getFormalParametersList

public java.util.List<JavaFormalParameterModel> getFormalParametersList()
Description copied from class: JavaMethodModel
get list of formal parameters.

Specified by:
getFormalParametersList in interface JavaTopLevelBlockOwnerModel
Specified by:
getFormalParametersList in class JavaMethodModel

getFormalParametersMap

public java.util.Map<java.lang.String,JavaFormalParameterModel> getFormalParametersMap()
Description copied from class: JavaMethodModel
get map of formal parameters.

Specified by:
getFormalParametersMap in interface JavaTopLevelBlockOwnerModel
Specified by:
getFormalParametersMap in class JavaMethodModel

getAnnotationsMap

public java.util.Map<java.lang.String,JavaAnnotationInstanceModel> getAnnotationsMap()
Description copied from class: JavaMethodModel
get Map of annotation.

Specified by:
getAnnotationsMap in interface JavaTopLevelBlockOwnerModel
Specified by:
getAnnotationsMap in class JavaMethodModel

getThrowsList

public java.util.List<JavaTypeModel> getThrowsList()
Description copied from interface: JavaTopLevelBlockOwnerModel
get List of throwed types in trows specification.


isSupportBlockModel

public boolean isSupportBlockModel()
Description copied from interface: JavaTopLevelBlockOwnerModel
return true if storing of block model is supported, otherwise false.


getTopLevelBlockModel

public JavaTopLevelBlockModel getTopLevelBlockModel()
Description copied from interface: JavaTopLevelBlockOwnerModel
return block model, if storing of block model is supported, otherwise throws NotSupportedException


isSynthetic

public boolean isSynthetic()
Description copied from class: JavaMethodModel
true for synthetic

Specified by:
isSynthetic in class JavaMethodModel

getModelTerm

public Term getModelTerm()
                  throws TermWareException,
                         EntityNotFoundException
AnnotationMethodModel(modifiers,name,type,defaultValue, context)

Throws:
TermWareException
EntityNotFoundException

hasDefaultValue

public boolean hasDefaultValue()
Description copied from class: JavaMethodModel
If method has default value

Specified by:
hasDefaultValue in class JavaMethodModel
Returns:
true if method has default value. (i.,e. this is annotation method).

getDefaultValue

public JavaExpressionModel getDefaultValue()
                                    throws TermWareException,
                                           EntityNotFoundException
Description copied from class: JavaMethodModel
return default value of method. If method has not default value, return null

Specified by:
getDefaultValue in class JavaMethodModel
Throws:
TermWareException
EntityNotFoundException