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, ExplicitCallGraph, JSCallGraph, PartialCallGraph, PrunedCallGraph
Basic interface for a call graph, which is a graph of
CGNode-
Method Summary
Modifier and TypeMethodDescriptionReturn the (fake) interproceduralroot nodeof the call graph.If you want to get all the nodes corresponding to a particular method, regardless of context, then usegetNodesintgetNumberOfTargets(CGNode node, CallSiteReference site) getPossibleSites(CGNode src, CGNode target) getPossibleTargets(CGNode node, CallSiteReference site) Return the set of CGNodes that represent possible targets of a particular call site from a particular nodeMethods inherited from interface EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdgesMethods inherited from interface Graph
removeNodeAndEdgesMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode, streamMethods inherited from interface NumberedEdgeManager
getPredNodeNumbers, getSuccNodeNumbersMethods inherited from interface NumberedNodeManager
getMaxNumber, getNode, getNumber, iterateNodes
-
Method Details
-
getFakeRootNode
-
getFakeWorldClinitNode
CGNode getFakeWorldClinitNode() -
getEntrypointNodes
Collection<CGNode> getEntrypointNodes()- Returns:
- an Iterator of the nodes designated as "root nodes"
-
getNode
-
getNodes
- 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
Return the set of CGNodes that represent possible targets of a particular call site from a particular node -
getNumberOfTargets
- Returns:
- the number of nodes that the call site may dispatch to
-
getPossibleSites
- Returns:
- iterator of CallSiteReference, the call sites in a node that might dispatch to the target node.
-