harpoon.Analysis
Class AllCallers

java.lang.Object
  |
  +--harpoon.Analysis.AllCallers

public class AllCallers
extends Object

AllCallers calculates the transitive closure of the dual of the call graph for methods that fulfill a certain condition.

Version:
$Id: AllCallers.java,v 1.2 2002/02/25 20:56:02 cananian Exp $
Author:
Karen K. Zee <kkz@alum.mit.edu>

Nested Class Summary
static interface AllCallers.MethodSet
          MethodSet defines the interface whose method select is used in getCallers as a predicate.
 
Constructor Summary
AllCallers(ClassHierarchy ch, HCodeFactory hcf)
          Creates an AllCallers object using the specified ClassHierarchy.
AllCallers(ClassHierarchy ch, HCodeFactory hcf, CallGraph cg)
           
 
Method Summary
 HMethod[] directCallers(HMethod hm)
          Returns all the direct callers of the hm method.
 Set directCallerSet(HMethod hm)
          Returns all the direct callers of the hm method.
 Set getCallers(AllCallers.MethodSet ms)
          getCallers returns a Set that contains all indirect and direct callers of callable methods that fulfill the predicate in the select method of ms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllCallers

public AllCallers(ClassHierarchy ch,
                  HCodeFactory hcf)
Creates an AllCallers object using the specified ClassHierarchy. Currently, hcf must be a code factory that generates quad-no-ssa or quad-ssi form because the dual of the call graph is built using CallGraph.


AllCallers

public AllCallers(ClassHierarchy ch,
                  HCodeFactory hcf,
                  CallGraph cg)
Method Detail

getCallers

public Set getCallers(AllCallers.MethodSet ms)
getCallers returns a Set that contains all indirect and direct callers of callable methods that fulfill the predicate in the select method of ms.


directCallers

public HMethod[] directCallers(HMethod hm)
Returns all the direct callers of the hm method.


directCallerSet

public Set directCallerSet(HMethod hm)
Returns all the direct callers of the hm method.