Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Class CHACallGraph  view CHACallGraph download

  extended byjava.util.AbstractMap
      extended byUtil.Collections.UnmodifiableMultiMap
          extended byCompil3r.Quad.CallGraph
              extended byCompil3r.Quad.CHACallGraph
All Implemented Interfaces:
Util.Collections.BinaryRelation, Util.Graphs.Graph, java.util.Map, Util.Collections.MultiMap
Direct Known Subclasses:

public class CHACallGraph
extends CallGraph

A simple call graph implementation based on class-hierarchy analysis with optional rapid type analysis.

$Id:,v 1.5 2003/07/04 07:31:54 joewhaley Exp $

Nested Class Summary
Nested classes inherited from class Compil3r.Quad.CallGraph
CallGraph.CallGraphMap, CallGraph.CallGraphNavigator, CallGraph.CallSiteMap, CallGraph.CallTargetMap
Nested classes inherited from class java.util.AbstractMap
Nested classes inherited from class java.util.Map
Field Summary
protected  java.util.Set classes
static CHACallGraph INSTANCE
Fields inherited from class Util.Collections.UnmodifiableMultiMap
Fields inherited from class java.util.AbstractMap
Constructor Summary
protected CHACallGraph()
  CHACallGraph(java.util.Set classes)
          Construct a call graph assuming only the given types are used by the program, i.e.
Method Summary
 java.util.Collection getRoots()
 java.util.Collection getTargetMethods(java.lang.Object context, ProgramLocation callSite)
          Returns the possible target methods of the given call site under the given context.
 void setRoots(java.util.Collection roots)
          Sets up the root methods to be the given set.
Methods inherited from class Compil3r.Quad.CallGraph
calculateBackEdges, calculateEdgeRelation, calculateReachableMethods, contains, entrySet, findDepths, getAllCallSites, getAllMethods, getCallees, getCallees, getCallers, getCallGraphMap, getCallSiteMap, getCallSites, getCallSites, getCallSites0, getCallSites0, getCallSites1, getNavigator, getTargetMethod, getTargetMethods, getValues, numberOfTargetMethods, numberOfTargetMethods, toString
Methods inherited from class Util.Collections.UnmodifiableMultiMap
add, addAll, addAll, clear, computeHistogram, computeHistogram, entrySetHelper, proxy, put, putAll, remove, remove, removeAll, retainAll
Methods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, size, values
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface Util.Collections.MultiMap
get, size
Methods inherited from interface java.util.Map
containsKey, containsValue, equals, hashCode, isEmpty, keySet, values

Field Detail


public static final CHACallGraph INSTANCE


protected final java.util.Set classes
Constructor Detail


public CHACallGraph(java.util.Set classes)
Construct a call graph assuming only the given types are used by the program, i.e. rapid type analysis.


protected CHACallGraph()
Method Detail


public java.util.Collection getTargetMethods(java.lang.Object context,
                                             ProgramLocation callSite)
Description copied from class: CallGraph
Returns the possible target methods of the given call site under the given context. The interpretation of the context object is specific to the type of call graph.

Specified by:
getTargetMethods in class CallGraph


public java.util.Collection getRoots()
Specified by:
getRoots in interface Util.Graphs.Graph
Specified by:
getRoots in class CallGraph


public void setRoots(java.util.Collection roots)
Description copied from class: CallGraph
Sets up the root methods to be the given set. Later call graph queries use the value that you pass in here. Implementing this method is optional -- it is only necessary if you use methods that require a root set, like getReachableMethods().

Specified by:
setRoots in class CallGraph