public abstract class BasicCallGraph<T> extends com.ibm.wala.util.graph.AbstractNumberedGraph<CGNode> implements CallGraph
| Modifier and Type | Class and Description |
|---|---|
protected static class |
BasicCallGraph.Key |
class |
BasicCallGraph.NodeImpl
A class that represents the a normal node in a call graph.
|
| Modifier and Type | Field and Description |
|---|---|
protected Map<MethodReference,Set<CGNode>> |
mr2Nodes
A mapping from MethodReference to Set of nodes that represent this methodReference.
|
| Constructor and Description |
|---|
BasicCallGraph() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsNode(CGNode N)
This implementation is necessary because the underlying SparseNumberedGraph may not support node membership tests.
|
abstract CGNode |
findOrCreateNode(IMethod method,
Context C)
Use with extreme care.
|
Collection<CGNode> |
getEntrypointNodes()
Note: not all successors of the root node are entrypoints
|
CGNode |
getFakeRootNode()
Return the (fake) interprocedural
root node of the call graph. |
CGNode |
getFakeWorldClinitNode() |
protected T |
getInterpreter(CGNode node) |
protected BasicCallGraph.NodeImpl |
getNode(BasicCallGraph.Key K) |
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 |
protected com.ibm.wala.util.graph.NumberedNodeManager<CGNode> |
getNodeManager() |
Set<CGNode> |
getNodes(MethodReference m) |
int |
getNumberOfNodes()
We override this since this class supports remove() on nodes, but the superclass doesn't.
|
void |
init() |
Iterator<CGNode> |
iterator()
We override this since this class supports remove() on nodes, but the superclass doesn't.
|
protected abstract CGNode |
makeFakeRootNode() |
protected abstract CGNode |
makeFakeWorldClinitNode() |
void |
registerEntrypoint(CGNode node)
record that a node is an entrypoint
|
protected void |
registerNode(BasicCallGraph.Key K,
CGNode N) |
void |
removeNodeAndEdges(CGNode N) |
void |
setInterpreter(T interpreter) |
void |
summarizeByPackage() |
String |
toString() |
getEdgeManager, getMaxNumber, getNode, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodesaddEdge, addNode, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeOutgoingEdgesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetClassHierarchy, getNumberOfTargets, getPossibleSites, getPossibleTargetsgetMaxNumber, getNode, getNumber, iterateNodesprotected final Map<MethodReference,Set<CGNode>> mr2Nodes
public void init()
throws com.ibm.wala.util.CancelException
com.ibm.wala.util.CancelExceptionprotected abstract CGNode makeFakeRootNode() throws com.ibm.wala.util.CancelException
com.ibm.wala.util.CancelExceptionprotected abstract CGNode makeFakeWorldClinitNode() throws com.ibm.wala.util.CancelException
com.ibm.wala.util.CancelExceptionpublic abstract CGNode findOrCreateNode(IMethod method, Context C) throws com.ibm.wala.util.CancelException
com.ibm.wala.util.CancelException - TODOprotected void registerNode(BasicCallGraph.Key K, CGNode N)
protected BasicCallGraph.NodeImpl getNode(BasicCallGraph.Key K)
public CGNode getFakeRootNode()
CallGraphroot node of the call graph.getFakeRootNode in interface CallGraphpublic CGNode getFakeWorldClinitNode()
getFakeWorldClinitNode in interface CallGraphpublic void registerEntrypoint(CGNode node)
public Collection<CGNode> getEntrypointNodes()
getEntrypointNodes in interface CallGraphpublic String toString()
toString in class com.ibm.wala.util.graph.AbstractGraph<CGNode>public void removeNodeAndEdges(CGNode N) throws com.ibm.wala.util.debug.UnimplementedError
public CGNode getNode(IMethod method, Context C)
CallGraphgetNodespublic Set<CGNode> getNodes(MethodReference m)
protected T getInterpreter(CGNode node)
node - a call graph node we want information aboutpublic int getNumberOfNodes()
public Iterator<CGNode> iterator()
public boolean containsNode(CGNode N)
containsNode in interface com.ibm.wala.util.graph.NodeManager<CGNode>containsNode in class com.ibm.wala.util.graph.AbstractGraph<CGNode>IllegalArgumentException - if N is nullpublic void setInterpreter(T interpreter)
protected com.ibm.wala.util.graph.NumberedNodeManager<CGNode> getNodeManager()
getNodeManager in class com.ibm.wala.util.graph.AbstractNumberedGraph<CGNode>public void summarizeByPackage()
Copyright © 2015. All rights reserved.