org.jtool.jxplatform.wrapper
Class JxFieldAccess

java.lang.Object
  extended byorg.jtool.jxplatform.wrapper.JxElement
      extended byorg.jtool.jxplatform.wrapper.JxDefUseExpression
          extended byorg.jtool.jxplatform.wrapper.JxExpression
              extended byorg.jtool.jxplatform.wrapper.JxVariable
                  extended byorg.jtool.jxplatform.wrapper.JxFieldAccess

public class JxFieldAccess
extends JxVariable

An object wrapping the Expr elment with the sort="FieldRef" attribute.

Author:
Katsuhisa Maruyama

Field Summary
protected  java.lang.String ref
          The name of a class defining the referenced field.
 
Fields inherited from class org.jtool.jxplatform.wrapper.JxVariable
binding, declaration, defid, FIELD, fqn, LOCAL, name, PARAMETER, sort
 
Fields inherited from class org.jtool.jxplatform.wrapper.JxDefUseExpression
defs, expressions, uses
 
Fields inherited from class org.jtool.jxplatform.wrapper.JxElement
element
 
Constructor Summary
protected JxFieldAccess()
          Creates a new, empty object.
protected JxFieldAccess(org.w3c.dom.Element elem)
          Creates a new object wrapping a Expr element with the sort="FieldRef" attribute.
protected JxFieldAccess(org.w3c.dom.Element elem, org.w3c.dom.Element decl)
          Creates a new object wrapping a Expr element with the sort="FieldRef" attribute.
 
Method Summary
 org.w3c.dom.Element getDeclaration()
          Returns the declaration element for the referenced field.
 java.lang.String getReferencedClassFqn()
          Returns the name of a class defining the referenced field.
 JxField getReferencedJxField()
          Returns the field wrapper referenced by this variable access.
 void print()
          Displays information about this variable wrapper for debugging.
 
Methods inherited from class org.jtool.jxplatform.wrapper.JxVariable
equals, getBindingName, getDefId, getFqn, getName, getStatementElement, getTypeFqn, isDeclarationVariable, isDefinedVariable, isField, isLocal, isNonDefUseVariable, isParameter, isUsedVariable, isVariable
 
Methods inherited from class org.jtool.jxplatform.wrapper.JxExpression
equals, getCastedTypeFqn, getCastedTypeName, getDotPrefix, getJavaStatement, getSort, isArrayCreation, isAssign, isConstructorCall, isDotOperator, isExpression, isFieldAccess, isInSimpleAssignment, isInstanceCreation, isMethodCall, isOpAssign, isParenthesis, isPostAssignment, isPostDecrement, isPostIncrement, isPreAssignment, isPreDecrement, isPreIncement, isSuperConstructorCall, isSuperReference, isThisConstructorCall, isThisReference, isVariableAccess
 
Methods inherited from class org.jtool.jxplatform.wrapper.JxDefUseExpression
addDefinedVariable, addDefinedVariableFirst, addUsedVariable, addUsedVariableFirst, clearDefinedVariable, clearUsedVariable, definesVariable, getDefinedVariables, getExpressions, getUsedVariables, removeDefinedVariable, removeUsedVariable, usesVariable
 
Methods inherited from class org.jtool.jxplatform.wrapper.JxElement
equals, existInTheSameClass, existInTheSameField, existInTheSameFile, existInTheSameMethod, existsInTheSameClass, existsInTheSameFile, existsInTheSameMethod, existsInTheSamePackage, getArrayOfElements, getChildElement, getChildElement, getChildElements, getChildElements, getChildNodes, getChildNodes, getClassElement, getDescendantElements, getDescendantElements, getDescendantElements, getDescendantElements, getElement, getElementById, getExpressionElements, getFieldElement, getFileElement, getFirstChildElement, getFirstChildElement, getId, getId, getIdentName, getIdentName, getJxClass, getJxField, getJxFile, getJxMethod, getJxStaticInit, getKeyword, getLine, getMethodElement, getStaticInitElement, getTypeElement, getTypeElements, getTypeName, indexOf, indexOf, isBinary, isClass, isClassOrInterface, isConstructor, isExpression, isFile, isImport, isInterface, isInTheSameField, isMethod, isMethodOrConstructor, isPackage, isStatement, isStaticInit, isTerminalElement, isType, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ref

protected java.lang.String ref
The name of a class defining the referenced field.

Constructor Detail

JxFieldAccess

protected JxFieldAccess()
Creates a new, empty object.


JxFieldAccess

protected JxFieldAccess(org.w3c.dom.Element elem,
                        org.w3c.dom.Element decl)
                 throws JxWrapperException
Creates a new object wrapping a Expr element with the sort="FieldRef" attribute.

Parameters:
elem - An DOM element to be wrapped.
decl - The declaration's element referenced by this field varaible.
Throws:
JxWrapperException - if the specified element is not valid.

JxFieldAccess

protected JxFieldAccess(org.w3c.dom.Element elem)
                 throws JxWrapperException
Creates a new object wrapping a Expr element with the sort="FieldRef" attribute.

Parameters:
elem - An DOM element to be wrapped.
Throws:
JxWrapperException - if the specified element is not valid.
Method Detail

getReferencedClassFqn

public java.lang.String getReferencedClassFqn()
Returns the name of a class defining the referenced field.

Returns:
The name of a class defining the referenced field.

getDeclaration

public org.w3c.dom.Element getDeclaration()
Returns the declaration element for the referenced field.

Overrides:
getDeclaration in class JxVariable
Returns:
The declaration element Field.

getReferencedJxField

public JxField getReferencedJxField()
                             throws JxWrapperException
Returns the field wrapper referenced by this variable access.

Returns:
The wrapper of the referenced field.
Throws:
JxWrapperException

print

public void print()
Displays information about this variable wrapper for debugging.

Overrides:
print in class JxVariable