public class PrunedCallGraph extends Object implements CallGraph
| Constructor and Description |
|---|
PrunedCallGraph(CallGraph cg,
Set<CGNode> keep) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdge(CGNode src,
CGNode dst) |
void |
addNode(CGNode n)
add a node to this graph
|
boolean |
containsNode(CGNode n) |
IClassHierarchy |
getClassHierarchy() |
Collection<CGNode> |
getEntrypointNodes() |
CGNode |
getFakeRootNode()
Return the (fake) interprocedural
root node of the call graph. |
CGNode |
getFakeWorldClinitNode() |
int |
getMaxNumber() |
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 |
CGNode |
getNode(int number) |
Set<CGNode> |
getNodes(MethodReference m) |
int |
getNumber(CGNode N) |
int |
getNumberOfNodes() |
int |
getNumberOfTargets(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
|
int |
getPredNodeCount(CGNode n)
Return the number of
immediate predecessor nodes of n |
IntSet |
getPredNodeNumbers(CGNode node) |
Iterator<CGNode> |
getPredNodes(CGNode n)
Return an
Iterator over the immediate predecessor nodes of n
This method never returns null. |
int |
getSuccNodeCount(CGNode n)
Return the number of
immediate successor nodes of this Node in the Graph |
IntSet |
getSuccNodeNumbers(CGNode node) |
Iterator<CGNode> |
getSuccNodes(CGNode n)
Return an Iterator over the immediate successor nodes of n
|
boolean |
hasEdge(CGNode src,
CGNode dst) |
Iterator<CGNode> |
iterateNodes(IntSet s) |
Iterator<CGNode> |
iterator() |
void |
removeAllIncidentEdges(CGNode node) |
void |
removeEdge(CGNode src,
CGNode dst) |
void |
removeIncomingEdges(CGNode node) |
void |
removeNode(CGNode n)
remove a node from this graph
|
void |
removeNodeAndEdges(CGNode n)
remove a node and all its incident edges
|
void |
removeOutgoingEdges(CGNode node) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic void removeNodeAndEdges(CGNode n) throws UnsupportedOperationException
GraphremoveNodeAndEdges in interface Graph<CGNode>UnsupportedOperationException - if the graph implementation does not allow removalpublic int getNumberOfNodes()
getNumberOfNodes in interface NodeManager<CGNode>public void addNode(CGNode n)
NodeManageraddNode in interface NodeManager<CGNode>public void removeNode(CGNode n) throws UnsupportedOperationException
NodeManagerremoveNode in interface NodeManager<CGNode>UnsupportedOperationExceptionpublic boolean containsNode(CGNode n)
containsNode in interface NodeManager<CGNode>public Iterator<CGNode> getPredNodes(CGNode n)
EdgeManagerIterator over the immediate predecessor nodes of n
This method never returns null.getPredNodes in interface EdgeManager<CGNode>Iterator over the immediate predecessor nodes of this Node.public int getPredNodeCount(CGNode n)
EdgeManagerimmediate predecessor nodes of ngetPredNodeCount in interface EdgeManager<CGNode>public Iterator<CGNode> getSuccNodes(CGNode n)
EdgeManager
This method never returns null.
getSuccNodes in interface EdgeManager<CGNode>public int getSuccNodeCount(CGNode n)
EdgeManagerimmediate successor nodes of this Node in the GraphgetSuccNodeCount in interface EdgeManager<CGNode>public void addEdge(CGNode src, CGNode dst)
addEdge in interface EdgeManager<CGNode>public void removeEdge(CGNode src, CGNode dst) throws UnsupportedOperationException
removeEdge in interface EdgeManager<CGNode>UnsupportedOperationExceptionpublic void removeAllIncidentEdges(CGNode node) throws UnsupportedOperationException
removeAllIncidentEdges in interface EdgeManager<CGNode>UnsupportedOperationExceptionpublic void removeIncomingEdges(CGNode node) throws UnsupportedOperationException
removeIncomingEdges in interface EdgeManager<CGNode>UnsupportedOperationExceptionpublic void removeOutgoingEdges(CGNode node) throws UnsupportedOperationException
removeOutgoingEdges in interface EdgeManager<CGNode>UnsupportedOperationExceptionpublic boolean hasEdge(CGNode src, CGNode dst)
hasEdge in interface EdgeManager<CGNode>public int getNumber(CGNode N)
getNumber in interface NumberedNodeManager<CGNode>public CGNode getNode(int number)
getNode in interface NumberedNodeManager<CGNode>public int getMaxNumber()
getMaxNumber in interface NumberedNodeManager<CGNode>public Iterator<CGNode> iterateNodes(IntSet s)
iterateNodes in interface NumberedNodeManager<CGNode>public IntSet getSuccNodeNumbers(CGNode node)
getSuccNodeNumbers in interface NumberedEdgeManager<CGNode>public IntSet getPredNodeNumbers(CGNode node)
getPredNodeNumbers in interface NumberedEdgeManager<CGNode>public CGNode getFakeRootNode()
CallGraphroot node of the call graph.getFakeRootNode in interface CallGraphpublic CGNode getFakeWorldClinitNode()
getFakeWorldClinitNode in interface CallGraphpublic Collection<CGNode> getEntrypointNodes()
getEntrypointNodes in interface CallGraphpublic CGNode getNode(IMethod method, Context C)
CallGraphgetNodespublic Set<CGNode> getNodes(MethodReference m)
public IClassHierarchy getClassHierarchy()
getClassHierarchy in interface CallGraphpublic Set<CGNode> getPossibleTargets(CGNode node, CallSiteReference site)
CallGraphgetPossibleTargets in interface CallGraphpublic int getNumberOfTargets(CGNode node, CallSiteReference site)
getNumberOfTargets in interface CallGraphpublic Iterator<CallSiteReference> getPossibleSites(CGNode src, CGNode target)
getPossibleSites in interface CallGraph