|
|||||||||||
| 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
A node of CFGs.
| Field Summary | |
protected java.lang.String |
defid
The identifier of the DOM element correspoinding to this node. |
protected org.w3c.dom.Element |
element
A DOM element correspoinding to this node. |
| 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 |
CFGNode()
Creates a new, empty object. |
protected |
CFGNode(int sort)
Creates a new node when the corresponding DOM element does not exist. |
protected |
CFGNode(int sort,
org.w3c.dom.Element elem)
Creates a new node. |
| Method Summary | |
boolean |
equals(GraphElement elem)
Tests if this node equals to a given node. |
java.lang.String |
getDefId()
Returns the identifier of the DOM element corresponding to this node. |
org.w3c.dom.Element |
getElem()
Returns the DOM element corresponding to this node. |
GraphElementSet |
getPredecessors()
Returns predecessors of this node. |
int |
getPredecessorsNumber()
Returns the number of predecessors of this node. |
GraphElementSet |
getSuccessors()
Returns successors of this node. |
int |
getSuccessorsNumber()
Returns the number of successors of this node. |
boolean |
hasDefVariable()
Tests if this node might have a defined variable. |
boolean |
hasUseVariable()
Tests if this node might have a used variable. |
boolean |
isAssignmentSt()
Tests if this node corresponds to the assignment statement. |
boolean |
isBranch()
Tests if this node is a branch node which has multiple outgoing edges. |
boolean |
isBranchSt()
Tests if this node corresponds to the branch statement. |
boolean |
isBreakSt()
Tests if this correspnds to the break statement. |
boolean |
isCallSt()
Tests if corresponds to the call statement. |
boolean |
isContinueSt()
Tests if this correspnds to the continue statement. |
boolean |
isDoSt()
Tests if this correspnds to the do statement. |
boolean |
isEntrySt()
Tests if this node corresponds to the entry statement.node |
boolean |
isExitSt()
Tests if this node corresponds to the exit statement. |
boolean |
isFieldSt()
Tests if this correspnds to the field declaration statement. |
boolean |
isFormalInSt()
Tests if this node corresponds to the formal-in statement. |
boolean |
isFormalOutSt()
Tests if this node corresponds to the formal-out statement. |
boolean |
isFormalSt()
Tests if this node corresponds to the formal parameter statement. |
boolean |
isForSt()
Tests if this correspnds to the for statement. |
boolean |
isGeneralAssignmentSt()
Tests if this node corresponds to the general assignment statement. |
boolean |
isGeneralStatement()
Tests if this node is classified into the general statement. |
boolean |
isIfSt()
Tests if this correspnds to the if statement. |
boolean |
isIgnoredSt()
Tests if this node corresponds to the ignored statement. |
boolean |
isJoin()
Tests if this node is a join node which has multiple incoming edges. |
boolean |
isLabelSt()
Tests if this node corresponds to the label statement. |
boolean |
isLocalSt()
Tests if this correspnds to the local declaration statement. |
boolean |
isLoopSt()
Tests if this node is classified into the loop ( while, do, and for). |
boolean |
isMergeSt()
Tests if this node corresponds to the merge statement. |
boolean |
isMethodEntry()
Tests if this node indicates a method entry node. |
boolean |
isParameterSt()
Tests if this node corresponds to the parameter statement. |
boolean |
isReturnSt()
Tests if this correspnds to the return statement. |
boolean |
isStatement()
Tests if this node indicates a statement node. |
boolean |
isSwitchLabel()
Tests if this node corresponds to the switch label. |
boolean |
isSwitchSt()
Tests if this correspnds to the switch statement. |
boolean |
isWhileSt()
Tests if this correspnds to the while statement. |
void |
print()
Displays information about this node. |
void |
print(java.lang.String mesg,
java.lang.StringBuffer buf)
Displays information about this node. |
void |
write(java.lang.StringBuffer buf)
Collects information about this node for writing an XML document. |
| Methods inherited from class org.jtool.jxplatform.graph.GraphNode |
addIncomingEdge, addIncomingEdges, addOutgoingEdge, addOutgoingEdges, clear, clearId, clearIncomingEdges, clearOutgoingEdges, getDstNodes, getId, getIncomingEdges, getOutgoingEdges, getSort, getSrcNodes, print, 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 org.w3c.dom.Element element
protected java.lang.String defid
id attribute, the default value will be used.
| Constructor Detail |
protected CFGNode()
protected CFGNode(int sort,
org.w3c.dom.Element elem)
sort - The sort of this node.elem - A DOM element corresponding to this node.protected CFGNode(int sort)
sort - The sort of this node.| Method Detail |
public org.w3c.dom.Element getElem()
public java.lang.String getDefId()
public boolean equals(GraphElement elem)
equals in interface GraphElementequals in class GraphNodeelem - A node to be checked.
true if the nodes are equal, otherwise false.public boolean isStatement()
false.public boolean isMethodEntry()
false.public GraphElementSet getPredecessors()
public GraphElementSet getSuccessors()
public int getPredecessorsNumber()
public int getSuccessorsNumber()
public boolean isBranch()
true if this node is a branch node, otherwise false.public boolean isJoin()
true if this node is a join node, otherwise false.public boolean isEntrySt()
true if this node corresponds to the entry statement, otherwise false.GraphNodeSortpublic boolean isExitSt()
true if this node corresponds to the exit statement, otherwise false.GraphNodeSortpublic boolean isCallSt()
true if this node is classified into the call node, otherwise false.GraphNodeSortpublic boolean isParameterSt()
true if this node corresponds to the parameter statement, otherwise false.GraphNodeSortpublic boolean isAssignmentSt()
true if this node corresponds to the assignment statement, otherwise false.GraphNodeSortpublic boolean isBranchSt()
true if this node corresponds to the branch statement, otherwise false.GraphNodeSortpublic boolean isIgnoredSt()
true if this node corresponds to the ignored statement, otherwise false.public boolean isLabelSt()
true if this node corresponds to the label statement, otherwise false.public boolean isMergeSt()
true if this node corresponds to the merge statement, otherwise false.public boolean isFormalSt()
true if this node corresponds to the formal parameter statement, otherwise false.public boolean isFormalInSt()
true if this node corresponds to the formal-in statement, otherwise false.public boolean isFormalOutSt()
true if this node corresponds to the formal-out statement, otherwise false.public boolean isLoopSt()
while, do, and for).
true if this node is classified into the loop, otherwise false.public boolean isGeneralStatement()
true if this node is classified into the general statement, otherwise false.public boolean hasDefVariable()
true if this node might have a defined variable, otherwise false.public boolean hasUseVariable()
true if this node might have a used variable, otherwise false.public boolean isSwitchLabel()
switch label.
true if this node corresponds to the switch label, otherwise false.public boolean isGeneralAssignmentSt()
true if this node corresponds to the general assignment statement, otherwise false.public boolean isFieldSt()
true if this correspnds to the field declaration statement, otherwise false.public boolean isLocalSt()
true if this correspnds to the local declaration statement, otherwise false.public boolean isReturnSt()
return statement.
true if this correspnds to the return statement, otherwise false.public boolean isBreakSt()
break statement.
true if this correspnds to the break statement, otherwise false.public boolean isContinueSt()
continue statement.
true this correspnds to the continue statement, otherwise false.public boolean isWhileSt()
while statement.
true if this correspnds to the while statement, otherwise false.public boolean isDoSt()
do statement.
true this correspnds to the do statement, otherwise false.public boolean isForSt()
for statement.
true this correspnds to the for statement, otherwise false.public boolean isSwitchSt()
switch statement.
true if this correspnds to the false.public boolean isIfSt()
if statement.
true this correspnds to the if statement, otherwise false.public void print()
print in interface GraphElementprint in class GraphNode
public void print(java.lang.String mesg,
java.lang.StringBuffer buf)
mesg - The description about this node.buf - The information about the node.public void write(java.lang.StringBuffer buf)
write in class GraphNodebuf - The information about the node.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||