Package soot.jimple.toolkits.callgraph
Class SlowCallGraph
- java.lang.Object
-
- soot.jimple.toolkits.callgraph.CallGraph
-
- soot.jimple.toolkits.callgraph.SlowCallGraph
-
public class SlowCallGraph extends CallGraph
Represents the edges in a call graph. This class is meant to act as only a container of edges; code for various call graph builders should be kept out of it, as well as most code for accessing the edges.- Author:
- Ondrej Lhotak
-
-
Field Summary
-
Fields inherited from class soot.jimple.toolkits.callgraph.CallGraph
dummy, srcMethodToEdge, srcUnitToEdge, tgtToEdge
-
-
Constructor Summary
Constructors Constructor Description SlowCallGraph()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddEdge(Edge e)Used to add an edge to the call graph.Iterator<Edge>edgesInto(MethodOrMethodContext m)Returns an iterator over all edges that have m as their target method.Iterator<Edge>edgesOutOf(MethodOrMethodContext m)Returns an iterator over all edges that have m as their source method.Iterator<Edge>edgesOutOf(Unit u)Returns an iterator over all edges that have u as their source unit.QueueReader<Edge>listener()Returns a QueueReader object containing all edges added so far, and which will be informed of any new edges that are later added to the graph.QueueReader<Edge>newListener()Returns a QueueReader object which will contain ONLY NEW edges which will be added to the graph.booleanremoveEdge(Edge e)Removes the edge e from the call graph.intsize()Returns the number of edges in the call graph.Iterator<MethodOrMethodContext>sourceMethods()Returns an iterator over all methods that are the sources of at least one edge.StringtoString()-
Methods inherited from class soot.jimple.toolkits.callgraph.CallGraph
findEdge, isEntryMethod, iterator, removeAllEdgesOutOf, removeEdge, removeEdges, swapEdgesOutOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
addEdge
public boolean addEdge(Edge e)
Used to add an edge to the call graph. Returns true iff the edge was not already present.
-
removeEdge
public boolean removeEdge(Edge e)
Removes the edge e from the call graph. Returns true iff the edge was originally present in the call graph.- Overrides:
removeEdgein classCallGraph
-
sourceMethods
public Iterator<MethodOrMethodContext> sourceMethods()
Returns an iterator over all methods that are the sources of at least one edge.- Overrides:
sourceMethodsin classCallGraph
-
edgesOutOf
public Iterator<Edge> edgesOutOf(Unit u)
Returns an iterator over all edges that have u as their source unit.- Overrides:
edgesOutOfin classCallGraph
-
edgesOutOf
public Iterator<Edge> edgesOutOf(MethodOrMethodContext m)
Returns an iterator over all edges that have m as their source method.- Overrides:
edgesOutOfin classCallGraph
-
edgesInto
public Iterator<Edge> edgesInto(MethodOrMethodContext m)
Returns an iterator over all edges that have m as their target method.
-
listener
public QueueReader<Edge> listener()
Returns a QueueReader object containing all edges added so far, and which will be informed of any new edges that are later added to the graph.
-
newListener
public QueueReader<Edge> newListener()
Returns a QueueReader object which will contain ONLY NEW edges which will be added to the graph.- Overrides:
newListenerin classCallGraph
-
-