|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jtool.jxplatform.graph.GraphNode
A node object of CFGs and PDGs.
| Field Summary | |
protected long |
id
The identifier of this node. |
protected static long |
nodeNum
The total number of created nodes. |
protected int |
sort
The sort of this node which is selected from among GraphNodeSort. |
| 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 |
GraphNode()
Creates a new, empty node. |
|
GraphNode(int sort)
Creates a new node. |
|
GraphNode(int sort,
long id)
Creates a new node. |
| Method Summary | |
void |
addIncomingEdge(GraphEdge edge)
Adds an edge incoming to this node. |
void |
addIncomingEdges(GraphElementSet edges)
Adds an edges incoming to this node. |
void |
addOutgoingEdge(GraphEdge edge)
Adds an edge outgoing from this node. |
void |
addOutgoingEdges(GraphElementList edges)
Adds an edges outgoing from this node. |
void |
clear()
Clears the contents of caches related to this node. |
static void |
clearId()
Resets the total number of created nodes. |
void |
clearIncomingEdges()
Clears the cache storing incoming edges. |
void |
clearOutgoingEdges()
Clears the cache storing outgoing edges. |
boolean |
equals(GraphElement elem)
Tests if this node equals to a given node. |
GraphElementSet |
getDstNodes()
Returns destination nodes of this node. |
long |
getId()
Return the identifier of this node. |
GraphElementSet |
getIncomingEdges()
Returns edges incoming to this node. |
GraphElementSet |
getOutgoingEdges()
Returns edges outgoing from this node. |
int |
getSort()
Returns the sort of this node. |
GraphElementSet |
getSrcNodes()
Returns source nodes of this node. |
void |
print()
Displays information about this node. |
void |
print(java.lang.StringBuffer buf)
Collects information about this node for printing. |
void |
removeIncomingEdge(GraphEdge edge)
Removes an edge incoming to this node. |
void |
removeOutgoingEdge(GraphEdge edge)
Removes an edge outgoing from this node. |
void |
setDstNodes()
Calculates destination nodes of this node. |
void |
setIncomingEdges(GraphElementSet edges)
Sets edges incoming to this node. |
void |
setOutgoingEdges(GraphElementSet edges)
Sets edges outgoing from this node. |
void |
setSort(int sort)
Sets the sort of this node. |
void |
setSrcNodes()
Calculates source nodes of this node. |
void |
write(java.lang.StringBuffer buf)
Collects information about this node for writing an XML document. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static long nodeNum
protected int sort
GraphNodeSort.
protected long id
| Constructor Detail |
protected GraphNode()
public GraphNode(int sort)
sort - The sort of this node.
public GraphNode(int sort,
long id)
sort - The sort of this node.id - The identifier of this node.| Method Detail |
public boolean equals(GraphElement elem)
equals in interface GraphElementelem - A node to be checked.
true if the nodes are equal, otherwise false.public void setSort(int sort)
sort - The sort of this node.public int getSort()
public long getId()
public static void clearId()
public void clear()
public void addIncomingEdge(GraphEdge edge)
edge - An imcoming edge.avapublic void addOutgoingEdge(GraphEdge edge)
edge - An outgoing edge.public void addIncomingEdges(GraphElementSet edges)
edges - The collection of incoming edges.public void addOutgoingEdges(GraphElementList edges)
edges - The collection of outgoing edges.public void removeIncomingEdge(GraphEdge edge)
edge - An imcoming edge.public void removeOutgoingEdge(GraphEdge edge)
edge - An outgoing edge.public void clearIncomingEdges()
public void clearOutgoingEdges()
public GraphElementSet getIncomingEdges()
public GraphElementSet getOutgoingEdges()
public void setIncomingEdges(GraphElementSet edges)
edges - The collection of incoming edges.public void setOutgoingEdges(GraphElementSet edges)
edges - The collection of outgoing edges.public void setSrcNodes()
public void setDstNodes()
public GraphElementSet getSrcNodes()
public GraphElementSet getDstNodes()
public void print()
print in interface GraphElementpublic void print(java.lang.StringBuffer buf)
buf - The information about the node.public void write(java.lang.StringBuffer buf)
buf - The information about the node.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||