ua.gradsoft.javachecker.models
Class JavaTermConstructorModel

java.lang.Object
  extended by ua.gradsoft.javachecker.models.JavaConstructorModel
      extended by ua.gradsoft.javachecker.models.JavaTermConstructorModel
All Implemented Interfaces:
AttributedEntity, JavaTermTopLevelBlockOwnerModel, JavaTopLevelBlockOwnerModel

public class JavaTermConstructorModel
extends JavaConstructorModel
implements JavaTermTopLevelBlockOwnerModel

Constructor for term.

Author:
Ruslan Shevchenko

Field Summary
static int BLOCK_TERM_INDEX
           
static int EXPLICIT_CONSTRUCTOR_INVOCATION_TERM_INDEX
           
static int FORMAL_PARAMETERS_TERM_INDEX
           
static int IDENTIFIER_TERM_INDEX
           
static int THROWS_NAMELIST_TERM_INDEX
           
static int TYPE_PARAMETERS_TERM_INDEX
           
 
Constructor Summary
JavaTermConstructorModel(Term modifiers, Term constructor, JavaTermTypeAbstractModel owner)
          Creates a new instance of JavaTermConstructorModel
 
Method Summary
 java.util.Map<java.lang.String,JavaAnnotationInstanceModel> getAnnotationsMap()
          get Map of declared annotations, binded to this constructor.
 java.util.List<JavaFormalParameterModel> getFormalParametersList()
          get List of formal parameters
 java.util.Map<java.lang.String,JavaFormalParameterModel> getFormalParametersMap()
          get Map of formal parameters.
 Term getModelTerm()
          ConstructorModel(modifiers,TypeParameters,identifier,FormalParameters,trowsNameList,BlockModel,context)
 java.lang.String getName()
          return name of method or 'Initializer' or 'Constructor'
 JavaTermTypeAbstractModel getTermTypeAbstractModel()
          get model of type.
 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
 JavaTypeModel getTypeModel()
           
 java.util.List<JavaTypeVariableAbstractModel> getTypeParameters()
           
 boolean isSupportBlockModel()
          return true if storing of block model is supported, otherwise false.
 
Methods inherited from class ua.gradsoft.javachecker.models.JavaConstructorModel
getAttribute, getChildAttributes, printErasedSignature, printSignature, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ua.gradsoft.javachecker.models.JavaTopLevelBlockOwnerModel
printErasedSignature, printSignature
 
Methods inherited from interface ua.gradsoft.javachecker.attributes.AttributedEntity
getAttribute, getChildAttributes, setAttribute
 

Field Detail

TYPE_PARAMETERS_TERM_INDEX

public static final int TYPE_PARAMETERS_TERM_INDEX
See Also:
Constant Field Values

IDENTIFIER_TERM_INDEX

public static final int IDENTIFIER_TERM_INDEX
See Also:
Constant Field Values

FORMAL_PARAMETERS_TERM_INDEX

public static final int FORMAL_PARAMETERS_TERM_INDEX
See Also:
Constant Field Values

THROWS_NAMELIST_TERM_INDEX

public static final int THROWS_NAMELIST_TERM_INDEX
See Also:
Constant Field Values

EXPLICIT_CONSTRUCTOR_INVOCATION_TERM_INDEX

public static final int EXPLICIT_CONSTRUCTOR_INVOCATION_TERM_INDEX
See Also:
Constant Field Values

BLOCK_TERM_INDEX

public static final int BLOCK_TERM_INDEX
See Also:
Constant Field Values
Constructor Detail

JavaTermConstructorModel

public JavaTermConstructorModel(Term modifiers,
                                Term constructor,
                                JavaTermTypeAbstractModel owner)
                         throws TermWareException
Creates a new instance of JavaTermConstructorModel

Throws:
TermWareException
Method Detail

getName

public java.lang.String getName()
Description copied from interface: JavaTopLevelBlockOwnerModel
return name of method or 'Initializer' or 'Constructor'

Specified by:
getName in interface JavaTopLevelBlockOwnerModel

getTypeModel

public JavaTypeModel getTypeModel()
Specified by:
getTypeModel in interface JavaTopLevelBlockOwnerModel

getTermTypeAbstractModel

public JavaTermTypeAbstractModel getTermTypeAbstractModel()
Description copied from interface: JavaTermTopLevelBlockOwnerModel
get model of type.

Specified by:
getTermTypeAbstractModel in interface JavaTermTopLevelBlockOwnerModel

getTypeParameters

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

getFormalParametersList

public java.util.List<JavaFormalParameterModel> getFormalParametersList()
                                                                 throws TermWareException,
                                                                        EntityNotFoundException
Description copied from interface: JavaTopLevelBlockOwnerModel
get List of formal parameters

Specified by:
getFormalParametersList in interface JavaTopLevelBlockOwnerModel
Specified by:
getFormalParametersList in class JavaConstructorModel
Throws:
TermWareException
EntityNotFoundException

getFormalParametersMap

public java.util.Map<java.lang.String,JavaFormalParameterModel> getFormalParametersMap()
                                                                                throws TermWareException,
                                                                                       EntityNotFoundException
Description copied from interface: JavaTopLevelBlockOwnerModel
get Map of formal parameters.

Specified by:
getFormalParametersMap in interface JavaTopLevelBlockOwnerModel
Specified by:
getFormalParametersMap in class JavaConstructorModel
Throws:
TermWareException
EntityNotFoundException

getThrowsList

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

Specified by:
getThrowsList in interface JavaTopLevelBlockOwnerModel
Throws:
TermWareException
EntityNotFoundException

isSupportBlockModel

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

Specified by:
isSupportBlockModel in interface JavaTopLevelBlockOwnerModel

getTopLevelBlockModel

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

Specified by:
getTopLevelBlockModel in interface JavaTopLevelBlockOwnerModel

getAnnotationsMap

public java.util.Map<java.lang.String,JavaAnnotationInstanceModel> getAnnotationsMap()
Description copied from class: JavaConstructorModel
get Map of declared annotations, binded to this constructor. (note, that inherited annotations are not here). Key is full name of annotation class.

Specified by:
getAnnotationsMap in interface JavaTopLevelBlockOwnerModel
Specified by:
getAnnotationsMap in class JavaConstructorModel
Returns:
map of annotations.

getModelTerm

public Term getModelTerm()
                  throws TermWareException,
                         EntityNotFoundException
ConstructorModel(modifiers,TypeParameters,identifier,FormalParameters,trowsNameList,BlockModel,context)

Specified by:
getModelTerm in interface JavaTopLevelBlockOwnerModel
Throws:
TermWareException
EntityNotFoundException