Package org.jtool.pdg
Class PDGNode
java.lang.Object
org.jtool.graph.GraphElement
org.jtool.graph.GraphNode
org.jtool.pdg.PDGNode
- Direct Known Subclasses:
ClDGEntry
,PDGEntry
,PDGStatement
A node of PDGs, ClDGs, and SDG.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CFGNode
The CFG node corresponding to this node.Fields inherited from class org.jtool.graph.GraphNode
id, incomingEdges, outgoingEdges
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests if a given PDG node is equal to this node.Returns the CFG node corresponding to this node.int
hashCode()
boolean
isBranch()
Tests if this node causes branching.boolean
isEntry()
Tests if this node indicates the entry for a method, a field, or a class.boolean
isLoop()
Tests if this node causes looping.boolean
Tests if this represents a parameter.boolean
Tests if this represents a statement.void
print()
Displays information on this node.sortNodes
(Collection<? extends PDGNode> nodes) Sorts the list of PDG nodestoString()
Obtains information on this node.Methods inherited from class org.jtool.graph.GraphNode
addIncomingEdge, addIncomingEdges, addOutgoingEdge, addOutgoingEdges, clear, equals, equals, getDstNodes, getId, getIncomingEdges, getOutgoingEdges, getSrcNodes, removeIncomingEdge, removeOutgoingEdge, setId, sortGraphNode
Methods inherited from class org.jtool.graph.GraphElement
difference, equals, equals, getIdString, intersection, subset, subsetEqual, union
-
Field Details
-
cfgnode
The CFG node corresponding to this node.
-
-
Constructor Details
-
PDGNode
Creates a new object that represents a PDG node. This method is not intended to be invoked by clients.- Parameters:
node
- the CFG node corresponding to this node
-
-
Method Details
-
getCFGNode
Returns the CFG node corresponding to this node.- Returns:
- the corresponding CFG node
-
isStatement
public boolean isStatement()Tests if this represents a statement.- Returns:
true
if this is a statement node, otherwisefalse
-
isParameter
public boolean isParameter()Tests if this represents a parameter.- Returns:
true
if this is a parameter node, otherwisefalse
-
isBranch
public boolean isBranch()Tests if this node causes branching.- Returns:
true
if this node causes branching, otherwisefalse
-
isLoop
public boolean isLoop()Tests if this node causes looping.- Returns:
true
if this node causes looping, otherwisefalse
-
isEntry
public boolean isEntry()Tests if this node indicates the entry for a method, a field, or a class.- Returns:
true
if this is an entry node, otherwisefalse
-
equals
Tests if a given PDG node is equal to this node.- Parameters:
node
- the node to be checked- Returns:
- the
true
if the given node is equal to this node
-
hashCode
public int hashCode() -
print
public void print()Displays information on this node. -
toString
Obtains information on this node. -
sortNodes
Sorts the list of PDG nodes- Parameters:
nodes
- the collection of the PDG nodes to be sorted- Returns:
- the sorted list of the PDG nodes
-