com.ibm.wala.ipa.callgraph
Interface CallGraph

All Superinterfaces:
EdgeManager<CGNode>, Graph<CGNode>, java.lang.Iterable<CGNode>, NodeManager<CGNode>, NumberedEdgeManager<CGNode>, NumberedGraph<CGNode>, NumberedNodeManager<CGNode>
All Known Implementing Classes:
AstCallGraph, BasicCallGraph, DelegatingExplicitCallGraph, ExplicitCallGraph, JSCallGraph

public interface CallGraph
extends NumberedGraph<CGNode>

Basic interface for a call graph, which is a graph of CGNode


Method Summary
 void dump(java.lang.String filename)
          Dump the callgraph to the specified file in dotty(1) format.
 ClassHierarchy getClassHierarchy()
           
 java.util.Collection<CGNode> getEntrypointNodes()
           
 CGNode getFakeRootNode()
          Return the (fake) interprocedural root node of the call graph.
 SSAContextInterpreter getInterpreter(CGNode node)
           
 CGNode getNode(IMethod method, Context C)
          If you want to get all the nodes corresponding to a particular method, regardless of context, then use getNodes
 java.util.Set<CGNode> getNodes(MethodReference m)
           
 
Methods inherited from interface com.ibm.wala.util.graph.Graph
removeNodeAndEdges
 
Methods inherited from interface com.ibm.wala.util.graph.NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode
 
Methods inherited from interface com.ibm.wala.util.graph.EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdges
 
Methods inherited from interface com.ibm.wala.util.graph.NumberedNodeManager
getMaxNumber, getNode, getNumber, iterateNodes
 
Methods inherited from interface com.ibm.wala.util.graph.NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode
 
Methods inherited from interface com.ibm.wala.util.graph.NumberedEdgeManager
getPredNodeNumbers, getSuccNodeNumbers
 
Methods inherited from interface com.ibm.wala.util.graph.EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdges
 

Method Detail

getFakeRootNode

CGNode getFakeRootNode()
Return the (fake) interprocedural root node of the call graph.

Returns:
the "fake" root node the call graph

getEntrypointNodes

java.util.Collection<CGNode> getEntrypointNodes()
Returns:
an Iterator of the nodes designated as "root nodes"

getNode

CGNode getNode(IMethod method,
               Context C)
If you want to get all the nodes corresponding to a particular method, regardless of context, then use getNodes

Returns:
the node corresponding a method in a context

getNodes

java.util.Set<CGNode> getNodes(MethodReference m)
Parameters:
m - a method reference
Returns:
the set of all nodes in the call graph that represent this method.

getInterpreter

SSAContextInterpreter getInterpreter(CGNode node)
Parameters:
node -
Returns:
an object that provides an interpretation of the node. This is the minimum interpreter functionality that all call graphs must provide.

dump

void dump(java.lang.String filename)
Dump the callgraph to the specified file in dotty(1) format.


getClassHierarchy

ClassHierarchy getClassHierarchy()
Returns:
the governing class hierarchy for this call graph