soot.jimple.toolkits.callgraph
Class SlowCallGraph

java.lang.Object
  extended by soot.jimple.toolkits.callgraph.CallGraph
      extended by 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
SlowCallGraph()
           
 
Method Summary
 boolean addEdge(Edge e)
          Used to add an edge to the call graph.
 Iterator edgesInto(MethodOrMethodContext m)
          Returns an iterator over all edges that have m as their target method.
 Iterator edgesOutOf(MethodOrMethodContext m)
          Returns an iterator over all edges that have m as their source method.
 Iterator edgesOutOf(Unit u)
          Returns an iterator over all edges that have u as their source unit.
 QueueReader 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 newListener()
          Returns a QueueReader object which will contain ONLY NEW edges which will be added to the graph.
 boolean removeEdge(Edge e)
          Removes the edge e from the call graph.
 int size()
          Returns the number of edges in the call graph.
 Iterator sourceMethods()
          Returns an iterator over all methods that are the sources of at least one edge.
 String toString()
           
 
Methods inherited from class soot.jimple.toolkits.callgraph.CallGraph
findEdge, isEntryMethod
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SlowCallGraph

public SlowCallGraph()
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.

Overrides:
addEdge in class CallGraph

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:
removeEdge in class CallGraph

sourceMethods

public Iterator sourceMethods()
Returns an iterator over all methods that are the sources of at least one edge.

Overrides:
sourceMethods in class CallGraph

edgesOutOf

public Iterator edgesOutOf(Unit u)
Returns an iterator over all edges that have u as their source unit.

Overrides:
edgesOutOf in class CallGraph

edgesOutOf

public Iterator edgesOutOf(MethodOrMethodContext m)
Returns an iterator over all edges that have m as their source method.

Overrides:
edgesOutOf in class CallGraph

edgesInto

public Iterator edgesInto(MethodOrMethodContext m)
Returns an iterator over all edges that have m as their target method.

Overrides:
edgesInto in class CallGraph

listener

public QueueReader 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.

Overrides:
listener in class CallGraph

newListener

public QueueReader newListener()
Returns a QueueReader object which will contain ONLY NEW edges which will be added to the graph.

Overrides:
newListener in class CallGraph

toString

public String toString()
Overrides:
toString in class CallGraph

size

public int size()
Returns the number of edges in the call graph.

Overrides:
size in class CallGraph