Class CHACallGraph
java.lang.Object
com.ibm.wala.util.graph.AbstractGraph<CGNode>
com.ibm.wala.util.graph.AbstractNumberedGraph<CGNode>
com.ibm.wala.ipa.callgraph.impl.BasicCallGraph<CHAContextInterpreter>
com.ibm.wala.ipa.callgraph.cha.CHACallGraph
- All Implemented Interfaces:
CallGraph, EdgeManager<CGNode>, Graph<CGNode>, NodeManager<CGNode>, NumberedEdgeManager<CGNode>, NumberedGraph<CGNode>, NumberedNodeManager<CGNode>, Iterable<CGNode>
Call graph in which call targets are determined entirely based on an
IClassHierarchy.-
Nested Class Summary
Nested classes/interfaces inherited from class BasicCallGraph
BasicCallGraph.Key, BasicCallGraph.NodeImpl -
Field Summary
Fields inherited from class BasicCallGraph
mr2Nodes -
Constructor Summary
ConstructorsConstructorDescriptionNOTE: after calling this constructor,init(Iterable)must be invoked to complete initializationCHACallGraph(IClassHierarchy cha, boolean applicationOnly) NOTE: after calling this constructor,init(Iterable)must be invoked to complete initialization -
Method Summary
Modifier and TypeMethodDescriptionfindOrCreateNode(IMethod method, Context C) Use with extreme care.protected NumberedEdgeManager<CGNode> intgetNumberOfTargets(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 nodevoidinit(Iterable<Entrypoint> entrypoints) Builds the call graph data structures.protected CGNodeprotected CGNodeMethods inherited from class BasicCallGraph
containsNode, getEntrypointNodes, getFakeRootNode, getFakeWorldClinitNode, getInterpreter, getNode, getNode, getNodeManager, getNodes, getNumberOfNodes, init, iterator, nodeToString, registerEntrypoint, registerNode, removeNodeAndEdges, setInterpreter, summarizeByPackage, toStringMethods inherited from class AbstractNumberedGraph
getMaxNumber, getNode, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodesMethods inherited from class AbstractGraph
addEdge, addNode, edgeString, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, nodeString, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeOutgoingEdges, streamMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface EdgeManager
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdgesMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface NodeManager
addNode, removeNode, streamMethods inherited from interface NumberedEdgeManager
getPredNodeNumbers, getSuccNodeNumbersMethods inherited from interface NumberedNodeManager
getMaxNumber, getNode, getNumber, iterateNodes
-
Constructor Details
-
CHACallGraph
NOTE: after calling this constructor,init(Iterable)must be invoked to complete initialization -
CHACallGraph
NOTE: after calling this constructor,init(Iterable)must be invoked to complete initialization
-
-
Method Details
-
init
Builds the call graph data structures. The call graph will only include methods reachable from the provided entrypoints.- Throws:
CancelException
-
getClassHierarchy
- Returns:
- the governing class hierarchy for this call graph
-
getPossibleTargets
Description copied from interface:CallGraphReturn 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.
-
makeFakeRootNode
- Specified by:
makeFakeRootNodein classBasicCallGraph<CHAContextInterpreter>- Throws:
CancelException
-
makeFakeWorldClinitNode
- Specified by:
makeFakeWorldClinitNodein classBasicCallGraph<CHAContextInterpreter>- Throws:
CancelException
-
findOrCreateNode
Description copied from class:BasicCallGraphUse with extreme care.- Specified by:
findOrCreateNodein classBasicCallGraph<CHAContextInterpreter>- Throws:
CancelException- TODO
-
getEdgeManager
- Specified by:
getEdgeManagerin classAbstractNumberedGraph<CGNode>- Returns:
- the object which manages edges in the graph
-