Package org.jtool.cfg
Class CallGraph
java.lang.Object
org.jtool.cfg.CallGraph
An object storing information about a call graph.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Appends a given call graph to this call graph.getCalleeNodes
(CFGEntry caller) Returns nodes corresponding to methods that a method for a given node calls.getCallerNodes
(CFGNode callee) Returns nodes corresponding to methods that calls a method for a given node.getCallFlowsFrom
(CFGNode node) Finds a call flow edge outgoing from a given node.getEdges()
Returns all edges of this call graph.getName()
Returns the name of this call graphgetNodes()
Returns all nodes of this call graph.void
print()
Displays information on this call graph.void
Sets a call flow edge in this call graph.toString()
Obtains information on this call graph.
-
Constructor Details
-
CallGraph
Creates a call graph having a given name.- Parameters:
name
- the name of this call graph
-
-
Method Details
-
getName
Returns the name of this call graph- Returns:
- the call graph name
-
getNodes
Returns all nodes of this call graph.- Returns:
- the collection of the nodes
-
getEdges
Returns all edges of this call graph.- Returns:
- the collection of the edges
-
append
Appends a given call graph to this call graph. This method is not intended to be invoked by clients.- Parameters:
graph
- the call graph to be appended
-
setCall
Sets a call flow edge in this call graph. This method is not intended to be invoked by clients.- Parameters:
caller
- a node for the caller sitecallee
- a node for the callee site
-
getCalleeNodes
Returns nodes corresponding to methods that a method for a given node calls.- Parameters:
caller
- the node for the caller site- Returns:
- the collection of callee sites
-
getCallerNodes
Returns nodes corresponding to methods that calls a method for a given node.- Parameters:
callee
- the node for the callee site- Returns:
- the collection of caller sites
-
getCallFlowsFrom
Finds a call flow edge outgoing from a given node.- Parameters:
node
- the CFG node having the outgoing edge- Returns:
- the collection of the call flow edges
-
print
public void print()Displays information on this call graph. -
toString
Obtains information on this call graph.
-