soot.jimple.toolkits.callgraph
Class CallGraph

java.lang.Object
  |
  +--soot.jimple.toolkits.callgraph.CallGraph

public class CallGraph
extends java.lang.Object

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.


Constructor Summary
CallGraph()
           
 
Method Summary
 boolean addEdge(Edge e)
          Used to add an edge to the call graph.
 java.util.Iterator edgesInto(SootMethod m)
          Returns an iterator over all edges that have m as their target method.
 java.util.Iterator edgesOutOf(SootMethod m)
          Returns an iterator over all edges that have m as their source method.
 java.util.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.
 java.util.Iterator sourceMethods()
          Returns an iterator over all methods that are the sources of at least one edge.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CallGraph

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

sourceMethods

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

edgesOutOf

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

edgesOutOf

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

edgesInto

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

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.

newListener

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object