|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jtool.jxplatform.wrapper.JxElement
org.jtool.jxplatform.wrapper.JxDefUseExpression
org.jtool.jxplatform.wrapper.JxExpression
org.jtool.jxplatform.wrapper.JxVariable
An object wrapping the Expr elment with the sort="VarRef" attribute.
| Field Summary | |
protected java.lang.String |
binding
The binding information about this variable or field access. |
protected org.w3c.dom.Element |
declaration
The declaration's element referenced by this varaible. |
protected java.lang.String |
defid
The identifier string of the declaration's element referenced by this variable. |
protected static int |
FIELD
The constant indicating that this varaible is a field variable. |
protected java.lang.String |
fqn
The fully-qualified type of this variable. |
protected static int |
LOCAL
The constant indicating that this varaible is a local varaible. |
protected java.lang.String |
name
The name of this variable. |
protected static int |
PARAMETER
The constant indicating that this varaible is a parameter. |
protected int |
sort
The sort of this variable. |
| 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 |
JxVariable()
Creates a new, empty object. |
protected |
JxVariable(org.w3c.dom.Element elem)
Creates a new object wrapping a Expr element
with the sort="VarRef" or sort="FieldRef" attribute. |
protected |
JxVariable(org.w3c.dom.Element elem,
org.w3c.dom.Element decl)
Creates a new object wrapping a Expr element
with the sort="VarRef" or sort="FieldRef" attribute. |
| Method Summary | |
boolean |
equals(JxVariable jvar)
Tests if a given variable wrapper equals to this one. |
java.lang.String |
getBindingName()
Returns the binding string of this variable. |
org.w3c.dom.Element |
getDeclaration()
Returns the declaration element for the referenced variable. |
java.lang.String |
getDefId()
Returns the identifier of the referenced variable (not the identifier of the variable reference). |
java.lang.String |
getFqn()
Returns the fully-qualified name of this variable. |
java.lang.String |
getName()
Returns the name of the referenced variable. |
org.w3c.dom.Element |
getStatementElement()
Obtains an element of a statement enclosing this variable. |
java.lang.String |
getTypeFqn()
Returns the fully-qualified name of this variable or casted type. |
boolean |
isDeclarationVariable()
Tests if this varibale is a variable declaration. |
boolean |
isDefinedVariable()
Tests if this variable is defined. |
boolean |
isField()
Tests if this element is a field variable. |
boolean |
isLocal()
Tests if this element is a local variable. |
boolean |
isNonDefUseVariable()
Tests if this variable is neither defined nor used. |
boolean |
isParameter()
Tests if this element is a parameter. |
boolean |
isUsedVariable()
Tests if this variable is used. |
static boolean |
isVariable(org.w3c.dom.Element elem)
Tests if a given element equals to Expr with sort="VarRef" or sort="FieldRef". |
void |
print()
Displays information about this variable wrapper for debugging. |
| 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String name
protected java.lang.String fqn
protected java.lang.String defid
protected java.lang.String binding
protected org.w3c.dom.Element declaration
protected int sort
protected static final int FIELD
protected static final int LOCAL
protected static final int PARAMETER
| Constructor Detail |
protected JxVariable()
protected JxVariable(org.w3c.dom.Element elem,
org.w3c.dom.Element decl)
throws JxWrapperException
Expr element
with the sort="VarRef" or sort="FieldRef" attribute.
elem - A DOM element to be wrapped.decl - The declaration's element referenced by this varaible.
The kind of this variable is undecided if this parameter is null.
JxWrapperException - if the specified element is not valid.
protected JxVariable(org.w3c.dom.Element elem)
throws JxWrapperException
Expr element
with the sort="VarRef" or sort="FieldRef" attribute.
elem - A DOM element to be wrapped.
JxWrapperException - if the specified element is not valid.| Method Detail |
public java.lang.String getName()
getName in class JxExpressionpublic java.lang.String getFqn()
public java.lang.String getTypeFqn()
getTypeFqn in class JxExpressionpublic java.lang.String getDefId()
public java.lang.String getBindingName()
public org.w3c.dom.Element getDeclaration()
Local or Param.public static boolean isVariable(org.w3c.dom.Element elem)
Expr with sort="VarRef" or sort="FieldRef".
elem - An element of the DOM.
true if the element equals to a variable, otherwise false.public boolean isField()
isField in class JxElementtrue if this element is a field.public boolean isLocal()
isLocal in class JxElementtrue if this element is a local variable.public boolean isParameter()
isParameter in class JxElementtrue if this element is a parameter.public boolean isDefinedVariable()
true if this variable is defined in a statement.public boolean isUsedVariable()
true if this variable is used in a statement.public boolean isNonDefUseVariable()
true if this variable is neither defined nor used in a statement.public boolean equals(JxVariable jvar)
jvar - A variable wrapper.
true if the variable wrapper equals to this one, otherwise false.
Returns false although the declaration of two variable wrappers is the same.public boolean isDeclarationVariable()
true if this variable is a variable declaration.public org.w3c.dom.Element getStatementElement()
getStatementElement in class JxElementpublic void print()
print in class JxExpression
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||