ua.gradsoft.javachecker.models
Class JavaMemberVariableModel

java.lang.Object
  extended by ua.gradsoft.javachecker.models.JavaMemberVariableModel
All Implemented Interfaces:
AttributedEntity, JavaVariableModel
Direct Known Subclasses:
JavaClassFieldModel, JavaEnumConstantModel, JavaTermMemberVariableModel, JavaTypeArgumentBoundMemberVariableModel

public abstract class JavaMemberVariableModel
extends java.lang.Object
implements JavaVariableModel

Abstract model for member variable.

Author:
Ruslan Shevchenko

Constructor Summary
JavaMemberVariableModel()
           
 
Method Summary
 Term getAttribute(java.lang.String name)
           
 AttributedEntity getChildAttributes(java.lang.String childName)
           
abstract  JavaExpressionModel getInitializerExpression()
           
 JavaVariableKind getKind()
          get kind of variable
abstract  Term getModelTerm()
           
abstract  JavaModifiersModel getModifiers()
          return modifiers
abstract  java.lang.String getName()
          get name of variable.
abstract  JavaTypeModel getOwnerType()
          return type which own this variable.
 JavaTopLevelBlockOwnerModel getTopLevelBlockOwner()
          return owner of top level block, where variablke is defined (constructor or method or initializer) if one exists, otherwise return null.
abstract  JavaTypeModel getType()
          get type of variable
abstract  boolean isSupportInitializerExpression()
           
 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
 
Methods inherited from interface ua.gradsoft.javachecker.models.JavaVariableModel
getAnnotationsMap
 

Constructor Detail

JavaMemberVariableModel

public JavaMemberVariableModel()
Method Detail

getModifiers

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

Specified by:
getModifiers in interface JavaVariableModel

getName

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

Specified by:
getName in interface JavaVariableModel
Returns:
name of member variable.

getKind

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

Specified by:
getKind in interface JavaVariableModel
Returns:
JavaVariableKind.MEMBER_VARIABLE

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

getType

public abstract JavaTypeModel getType()
                               throws TermWareException,
                                      EntityNotFoundException
Description copied from interface: JavaVariableModel
get type of variable

Specified by:
getType in interface JavaVariableModel
Throws:
TermWareException
EntityNotFoundException

getOwnerType

public abstract 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

isSupportInitializerExpression

public abstract boolean isSupportInitializerExpression()

getInitializerExpression

public abstract JavaExpressionModel getInitializerExpression()
                                                      throws TermWareException,
                                                             EntityNotFoundException
Throws:
TermWareException
EntityNotFoundException

getModelTerm

public abstract Term getModelTerm()
                           throws TermWareException,
                                  EntityNotFoundException
Throws:
TermWareException
EntityNotFoundException