Package com.ibm.wala.ipa.callgraph
Interface CallGraph
-
- All Superinterfaces:
EdgeManager<CGNode>,Graph<CGNode>,Iterable<CGNode>,NodeManager<CGNode>,NumberedEdgeManager<CGNode>,NumberedGraph<CGNode>,NumberedNodeManager<CGNode>
- All Known Implementing Classes:
AstCallGraph,BasicCallGraph,CHACallGraph,CrossLanguageCallGraph,DelegatingExplicitCallGraph,DexExplicitCallGraph,ExplicitCallGraph,PartialCallGraph,PrunedCallGraph
public interface CallGraph extends NumberedGraph<CGNode>
Basic interface for a call graph, which is a graph ofCGNode
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IClassHierarchygetClassHierarchy()Collection<CGNode>getEntrypointNodes()CGNodegetFakeRootNode()Return the (fake) interproceduralroot nodeof the call graph.CGNodegetFakeWorldClinitNode()CGNodegetNode(IMethod method, Context C)If you want to get all the nodes corresponding to a particular method, regardless of context, then usegetNodesSet<CGNode>getNodes(MethodReference m)intgetNumberOfTargets(CGNode node, CallSiteReference site)Iterator<CallSiteReference>getPossibleSites(CGNode src, CGNode target)Set<CGNode>getPossibleTargets(CGNode node, CallSiteReference site)Return the set of CGNodes that represent possible targets of a particular call site from a particular node-
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.Graph
removeNodeAndEdges
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
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.NumberedNodeManager
getMaxNumber, getNode, getNumber, iterateNodes
-
-
-
-
Method Detail
-
getFakeRootNode
CGNode getFakeRootNode()
Return the (fake) interproceduralroot nodeof the call graph.- Returns:
- the "fake" root node the call graph
-
getFakeWorldClinitNode
CGNode getFakeWorldClinitNode()
-
getEntrypointNodes
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 usegetNodes- Returns:
- the node corresponding a method in a context
-
getNodes
Set<CGNode> getNodes(MethodReference m)
- Parameters:
m- a method reference- Returns:
- the set of all nodes in the call graph that represent this method.
-
getClassHierarchy
IClassHierarchy getClassHierarchy()
- Returns:
- the governing class hierarchy for this call graph
-
getPossibleTargets
Set<CGNode> getPossibleTargets(CGNode node, CallSiteReference site)
Return the set of CGNodes that represent possible targets of a particular call site from a particular node
-
getNumberOfTargets
int getNumberOfTargets(CGNode node, CallSiteReference site)
- Returns:
- the number of nodes that the call site may dispatch to
-
getPossibleSites
Iterator<CallSiteReference> getPossibleSites(CGNode src, CGNode target)
- Returns:
- iterator of CallSiteReference, the call sites in a node that might dispatch to the target node.
-
-