|
|||||||||||
| 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
An object wrapping the element for an expression that might define and/or use a variable.
This wrapper is common to Expr, JxStatement, JxField, and JxLocal.
| Field Summary | |
protected JxVariableList |
defs
The list of variables defined in this statement. |
protected org.w3c.dom.Element[] |
expressions
The elements of expressions contained in this statement. |
protected JxVariableList |
uses
The list of variables used in this statement. |
| Fields inherited from class org.jtool.jxplatform.wrapper.JxElement |
element |
| Constructor Summary | |
protected |
JxDefUseExpression()
Creates a new, empty object. |
protected |
JxDefUseExpression(org.w3c.dom.Element elem)
Creates a new object wrapping an element for an expressin with defined and/or used variables. |
| Method Summary | |
void |
addDefinedVariable(JxVariable jv)
Adds a variable into a variable list of defined variables in this expression. |
void |
addDefinedVariableFirst(JxVariable jv)
Adds a variable into the head of a variable list of defined variables in this expression. |
void |
addUsedVariable(JxVariable jv)
Adds a variable into a variable list of used variables in this expression. |
void |
addUsedVariableFirst(JxVariable jv)
Adds a variable into the head of a variable list of used variables in this expression. |
void |
clearDefinedVariable()
Removes all variables in a variable list of defined variables in this expression. |
void |
clearUsedVariable()
Removes all variables in a variable list of used variables in this expression. |
boolean |
definesVariable()
Tests if this statement defines any variable. |
boolean |
equals(JxExpression jexpr)
Tests if a given expression wrapper equals to this one. |
JxVariableList |
getDefinedVariables()
Returns the list of variables defined in this statement. |
org.w3c.dom.Element[] |
getExpressions()
Obtains the elements of expressions contained in this statement. |
JxVariableList |
getUsedVariables()
Returns the list of variables used in this statement. |
void |
print()
Displays information about this statement wrapper for debugging. |
void |
removeDefinedVariable(JxVariable jv)
Removes a variable from a variable list of defined variables in this expression. |
void |
removeUsedVariable(JxVariable jv)
Removes a variable from a variable list of used variables in this expression. |
boolean |
usesVariable()
Tests if this statement uses any variable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected org.w3c.dom.Element[] expressions
protected JxVariableList defs
protected JxVariableList uses
| Constructor Detail |
protected JxDefUseExpression()
protected JxDefUseExpression(org.w3c.dom.Element elem)
throws JxWrapperException
elem - An DOM element to be wrapped.
JxWrapperException - if the specified element is not valid.| Method Detail |
public org.w3c.dom.Element[] getExpressions()
public boolean equals(JxExpression jexpr)
jexpr - An expression wrapper.
true if the expression wrapper equals to this one, otherwise false.
public JxVariableList getDefinedVariables()
throws JxWrapperException
JxVariableList containing variables defined in this statement.
JxWrapperException - if the collection of variables fails.
public JxVariableList getUsedVariables()
throws JxWrapperException
JxVariableList containing variables used in this statement.
JxWrapperException - if the collection of variables fails.
public boolean definesVariable()
throws JxWrapperException
true if this statement defines a variable.
JxWrapperException - if the collection of variables fails.
public boolean usesVariable()
throws JxWrapperException
true if this statement uses a variable.
JxWrapperException - if the collection of variables fails.public void addDefinedVariable(JxVariable jv)
public void addUsedVariable(JxVariable jv)
public void addDefinedVariableFirst(JxVariable jv)
public void addUsedVariableFirst(JxVariable jv)
public void removeDefinedVariable(JxVariable jv)
public void removeUsedVariable(JxVariable jv)
public void clearDefinedVariable()
public void clearUsedVariable()
public void print()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||