ua.gradsoft.javachecker.models
Class JavaTermLocalVariableModel

java.lang.Object
  extended by ua.gradsoft.javachecker.models.JavaTermLocalVariableModel
All Implemented Interfaces:
AttributedEntity, JavaLocalVariableModel, JavaVariableModel

public class JavaTermLocalVariableModel
extends java.lang.Object
implements JavaLocalVariableModel

Model of local variable.


Constructor Summary
JavaTermLocalVariableModel(Term identifierTerm, JavaLocalVariableKind kind, Term modifiersTerm, Term typeTerm, Term initOrIterateExpressionTerm, JavaTermExpressionModel initExpression, JavaTermStatementModel statement)
           
 
Method Summary
 java.util.Map<java.lang.String,JavaAnnotationInstanceModel> getAnnotationsMap()
          return set of annotations for this variable.
 Term getAttribute(java.lang.String name)
           
 AttributedEntity getChildAttributes(java.lang.String childName)
           
 JavaExpressionModel getInitExpressionModel()
          return InitExpressionModel or null if one is empty.
 Term getInitOrIterateTerm()
           
 JavaVariableKind getKind()
          get kind of variable
 Term getModelTerm()
          LocalVariableModel(Modifiers,TypeRef(),Identifier,Init, ctx)
 JavaModifiersModel getModifiers()
          return modifiers
 java.lang.String getName()
          get name of variable.
 JavaTypeModel getOwnerType()
          return type which own this variable.
 JavaStatementModel getStatement()
           
 JavaTopLevelBlockOwnerModel getTopLevelBlockOwner()
          return owner of top level block, where variablke is defined (constructor or method or initializer) if one exists, otherwise return null.
 JavaTypeModel getType()
          get type model.
 Term getTypeTerm()
           
 boolean isForHead()
           
 void setAttribute(java.lang.String name, Term value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaTermLocalVariableModel

public JavaTermLocalVariableModel(Term identifierTerm,
                                  JavaLocalVariableKind kind,
                                  Term modifiersTerm,
                                  Term typeTerm,
                                  Term initOrIterateExpressionTerm,
                                  JavaTermExpressionModel initExpression,
                                  JavaTermStatementModel statement)
                           throws TermWareException
Throws:
TermWareException
Method Detail

getName

public java.lang.String getName()
Description copied from interface: JavaVariableModel
get name of variable.

Specified by:
getName in interface JavaLocalVariableModel
Specified by:
getName in interface JavaVariableModel

getKind

public JavaVariableKind getKind()
Description copied from interface: JavaVariableModel
get kind of variable

Specified by:
getKind in interface JavaVariableModel

getType

public JavaTypeModel getType()
                      throws TermWareException,
                             EntityNotFoundException
get type model.

Specified by:
getType in interface JavaLocalVariableModel
Specified by:
getType in interface JavaVariableModel
Throws:
TermWareException
EntityNotFoundException

getStatement

public JavaStatementModel getStatement()
Specified by:
getStatement in interface JavaLocalVariableModel

isForHead

public boolean isForHead()
Specified by:
isForHead in interface JavaLocalVariableModel

getInitExpressionModel

public JavaExpressionModel getInitExpressionModel()
Description copied from interface: JavaLocalVariableModel
return InitExpressionModel or null if one is empty.

Specified by:
getInitExpressionModel in interface JavaLocalVariableModel

getModelTerm

public Term getModelTerm()
                  throws TermWareException,
                         EntityNotFoundException
LocalVariableModel(Modifiers,TypeRef(),Identifier,Init, ctx)

Specified by:
getModelTerm in interface JavaLocalVariableModel
Throws:
TermWareException
EntityNotFoundException

getTypeTerm

public Term getTypeTerm()

getInitOrIterateTerm

public Term getInitOrIterateTerm()

getAnnotationsMap

public java.util.Map<java.lang.String,JavaAnnotationInstanceModel> getAnnotationsMap()
Description copied from interface: JavaVariableModel
return set of annotations for this variable.

Specified by:
getAnnotationsMap in interface JavaVariableModel

getModifiers

public JavaModifiersModel getModifiers()
Description copied from interface: JavaVariableModel
return modifiers

Specified by:
getModifiers in interface JavaVariableModel

getOwnerType

public JavaTypeModel getOwnerType()
Description copied from interface: JavaVariableModel
return type which own this variable. (i. e. class where one is defined)

Specified by:
getOwnerType in interface JavaVariableModel

getTopLevelBlockOwner

public JavaTopLevelBlockOwnerModel getTopLevelBlockOwner()
Description copied from interface: JavaVariableModel
return owner of top level block, where variablke is defined (constructor or method or initializer) if one exists, otherwise return null.

Specified by:
getTopLevelBlockOwner in interface JavaVariableModel

getAttribute

public Term getAttribute(java.lang.String name)
                  throws TermWareException
Specified by:
getAttribute in interface AttributedEntity
Throws:
TermWareException

setAttribute

public void setAttribute(java.lang.String name,
                         Term value)
                  throws TermWareException
Specified by:
setAttribute in interface AttributedEntity
Throws:
TermWareException

getChildAttributes

public AttributedEntity getChildAttributes(java.lang.String childName)
Specified by:
getChildAttributes in interface AttributedEntity