public class PartialCallGraph extends DelegatingGraph<CGNode> implements CallGraph
Modifier and Type | Field and Description |
---|---|
protected CallGraph |
cg |
protected Collection<CGNode> |
partialRoots |
Modifier | Constructor and Description |
---|---|
protected |
PartialCallGraph(CallGraph cg,
Collection<CGNode> partialRoots,
Graph<CGNode> partialGraph) |
addEdge, addNode, containsNode, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
removeNodeAndEdges
addNode, containsNode, getNumberOfNodes, iterator, removeNode
forEach, spliterator
addEdge, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdges
protected final CallGraph cg
protected final Collection<CGNode> partialRoots
protected PartialCallGraph(CallGraph cg, Collection<CGNode> partialRoots, Graph<CGNode> partialGraph)
public static PartialCallGraph make(CallGraph cg, Collection<CGNode> partialRoots, Collection<CGNode> nodes)
cg
- the original call graphpartialRoots
- roots of the new, partial graphnodes
- set of nodes that will be included in the new, partial call graphpublic static PartialCallGraph make(CallGraph cg, Collection<CGNode> partialRoots)
cg
- the original call graphpartialRoots
- roots of the new, partial graph
the result contains only nodes reachable from the partialRoots in the original call graph.public CGNode getFakeRootNode() throws UnsupportedOperationException
CallGraph
root node
of the call graph.getFakeRootNode
in interface CallGraph
UnsupportedOperationException
public CGNode getFakeWorldClinitNode() throws UnsupportedOperationException
getFakeWorldClinitNode
in interface CallGraph
UnsupportedOperationException
public Collection<CGNode> getEntrypointNodes()
getEntrypointNodes
in interface CallGraph
public CGNode getNode(IMethod method, Context C)
CallGraph
getNodes
public Set<CGNode> getNodes(MethodReference m)
public IClassHierarchy getClassHierarchy()
getClassHierarchy
in interface CallGraph
public Iterator<CGNode> iterateNodes(IntSet nodes)
iterateNodes
in interface NumberedNodeManager<CGNode>
public int getMaxNumber()
getMaxNumber
in interface NumberedNodeManager<CGNode>
public CGNode getNode(int index)
getNode
in interface NumberedNodeManager<CGNode>
public int getNumber(CGNode n)
getNumber
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 int getNumberOfTargets(CGNode node, CallSiteReference site)
getNumberOfTargets
in interface CallGraph
public Iterator<CallSiteReference> getPossibleSites(CGNode src, CGNode target)
getPossibleSites
in interface CallGraph
public Set<CGNode> getPossibleTargets(CGNode node, CallSiteReference site)
CallGraph
getPossibleTargets
in interface CallGraph