|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jtool.jxplatform.graph.GraphNode
org.jtool.jxplatform.graph.cfg.CFGNode
org.jtool.jxplatform.graph.cfg.CFGStatement
A statement node of CFGs.
| Field Summary | |
protected JxVariableList |
defs
A collection of variables defined at this node. |
protected JxVariableList |
uses
A collection of variables used at this node. |
| Fields inherited from class org.jtool.jxplatform.graph.cfg.CFGNode |
defid, element |
| Fields inherited from class org.jtool.jxplatform.graph.GraphNode |
id, nodeNum, sort |
| Fields inherited from interface org.jtool.jxplatform.graph.GraphNodeSort |
actualIn, actualOut, assignments, assignmentSt, branches, breakSt, callings, caseLabel, classEntry, classExit, constructorCall, constructorEntry, constructorExit, continueSt, defaultLabel, doSt, entries, exits, fieldDecl, formalIn, formalOut, forSt, ifSt, ignores, instanceCreation, interfaceEntry, interfaceExit, labelSt, localDecl, mergeSt, methodCall, methodEntry, methodExit, newSt, parameters, polymorphicCall, returnSt, switchSt, synchronizedSt, throwSt, trySt, whileSt |
| Constructor Summary | |
protected |
CFGStatement()
Creates a new, empty object. |
protected |
CFGStatement(int sort,
org.w3c.dom.Element elem)
Creates a new node. |
| Method Summary | |
protected void |
addDefinedVariable(JxVariable jv)
Adds a defined variable. |
protected void |
addDefinedVariables(JxDefUseExpression jexp)
Adds defined variables of an expression or a statement. |
protected void |
addDefinedVariables(JxVariableList jvl)
Adds defined variables in a collection. |
protected void |
addUsedVariable(JxVariable jv)
Adds a used variable. |
protected void |
addUsedVariables(JxDefUseExpression jexp)
Adds used variables of an expression or a statement. |
protected void |
addUsedVariables(JxVariableList jvl)
Adds used variables in a collection. |
protected void |
clearDefinedVariable()
Clears a collection of defined variables. |
protected void |
clearUsedVariable()
Clears a collection of used variables. |
boolean |
definesVariable(JxVariable jv)
Tests if this statement defines a variable. |
JxVariable |
getDefinedVariable(java.lang.String name)
Returns a defined variable with a name at this statement. |
JxVariableList |
getDefinedVariables()
Returns variables defined at this statement. |
JxVariable |
getUsedVariable(java.lang.String name)
Returns a defined variable with a name at this statement. |
JxVariableList |
getUsedVariables()
Returns variables used at this statement. |
boolean |
isStatement()
Tests if this node indicates a statement. |
void |
print(java.lang.StringBuffer buf)
protected Collects information about this statement for printing. |
void |
printDefUse(java.lang.String mesg,
java.lang.StringBuffer buf)
Collects information about this statement for printing. |
protected void |
removeDefinedVariable(JxVariable jv)
Removes a defined variable. |
protected void |
removeUsedVariable(JxVariable jv)
Removes a used variable. |
protected void |
setDefinedVariable(JxVariable jv)
Sets a defined variable. |
protected void |
setDefinedVariables(JxDefUseExpression jexp)
Sets defined variables of a stetement. |
protected void |
setUsedVariable(JxVariable jv)
Sets a used variable. |
protected void |
setUsedVariables(JxDefUseExpression jexp)
Sets used variables of a statement. |
boolean |
usesVariable(JxVariable jv)
Tests if this statement uses a variable. |
| Methods inherited from class org.jtool.jxplatform.graph.cfg.CFGNode |
equals, getDefId, getElem, getPredecessors, getPredecessorsNumber, getSuccessors, getSuccessorsNumber, hasDefVariable, hasUseVariable, isAssignmentSt, isBranch, isBranchSt, isBreakSt, isCallSt, isContinueSt, isDoSt, isEntrySt, isExitSt, isFieldSt, isFormalInSt, isFormalOutSt, isFormalSt, isForSt, isGeneralAssignmentSt, isGeneralStatement, isIfSt, isIgnoredSt, isJoin, isLabelSt, isLocalSt, isLoopSt, isMergeSt, isMethodEntry, isParameterSt, isReturnSt, isSwitchLabel, isSwitchSt, isWhileSt, print, print, write |
| Methods inherited from class org.jtool.jxplatform.graph.GraphNode |
addIncomingEdge, addIncomingEdges, addOutgoingEdge, addOutgoingEdges, clear, clearId, clearIncomingEdges, clearOutgoingEdges, getDstNodes, getId, getIncomingEdges, getOutgoingEdges, getSort, getSrcNodes, removeIncomingEdge, removeOutgoingEdge, setDstNodes, setIncomingEdges, setOutgoingEdges, setSort, setSrcNodes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected JxVariableList defs
protected JxVariableList uses
| Constructor Detail |
protected CFGStatement()
protected CFGStatement(int sort,
org.w3c.dom.Element elem)
sort - The sort of this node.elem - A DOM element corresponding to this node.| Method Detail |
public boolean isStatement()
isStatement in class CFGNodetrue.
protected void setDefinedVariables(JxDefUseExpression jexp)
throws JxWrapperException
jexp - A def-use expression wrapper which might define variables.
JxWrapperException - if the collection of variables fails.
protected void setUsedVariables(JxDefUseExpression jexp)
throws JxWrapperException
jexp - A def-use expression wrapper which might use variables.
JxWrapperException - if the collection of variables fails.protected void setDefinedVariable(JxVariable jv)
jv - A variable wrapper to be stored.protected void setUsedVariable(JxVariable jv)
jv - A variable wrapper to be stored.protected void addDefinedVariable(JxVariable jv)
jv - A variable wrapper to be added.protected void addUsedVariable(JxVariable jv)
jv - A variable wrapper to be added.protected void addDefinedVariables(JxVariableList jvl)
jvl - A collection of defined variables to be added.protected void addUsedVariables(JxVariableList jvl)
jvl - A collection of used variables to be added.protected void removeDefinedVariable(JxVariable jv)
jv - A variable wrapper to be removed.protected void removeUsedVariable(JxVariable jv)
jv - A variable wrapper to be removed.protected void clearDefinedVariable()
protected void clearUsedVariable()
protected void addDefinedVariables(JxDefUseExpression jexp)
throws JxWrapperException
jexp - A def-use expression wrapper which might define variables.
JxWrapperException - if the collection of variables fails.
protected void addUsedVariables(JxDefUseExpression jexp)
throws JxWrapperException
jexp - A def-use expression wrapper which might use variables.
JxWrapperException - if the collection of variables fails.public JxVariableList getDefinedVariables()
public JxVariableList getUsedVariables()
public boolean definesVariable(JxVariable jv)
jv - A variable wrapper to be tested.
true if this statement defines the variable, otherwise false.public boolean usesVariable(JxVariable jv)
jv - A variable wrapper to be tested.
true if this statement uses the variable, otherwise false.public JxVariable getDefinedVariable(java.lang.String name)
name - The name of a variable to be retrieved.
null if there is no variable found.public JxVariable getUsedVariable(java.lang.String name)
name - The name of a variable to be retrieved.
null if there is no variable found.public void print(java.lang.StringBuffer buf)
print in class GraphNodebuf - The information about the stetement.
public void printDefUse(java.lang.String mesg,
java.lang.StringBuffer buf)
mesg - The description about this statement.buf - The information about the statement.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||