harpoon.Analysis.MetaMethods
Class SmartCallGraph

java.lang.Object
  |
  +--harpoon.Analysis.MetaMethods.SmartCallGraph
All Implemented Interfaces:
CallGraph, CallGraph

public class SmartCallGraph
extends Object
implements CallGraph

SmartCallGraph

Version:
$Id: SmartCallGraph.java,v 1.2 2002/02/25 20:58:21 cananian Exp $
Author:
Alexandru SALCIANU <salcianu@retezat.lcs.mit.edu>

Constructor Summary
SmartCallGraph(MetaCallGraph mcg)
          Creates a SmartCallGraph.
 
Method Summary
 Set callableMethods()
          Returns the set of all the methods that can be called in the execution of the program.
 HMethod[] calls(HMethod hm)
          Returns an array containing all possible methods called by method m.
 HMethod[] calls(HMethod hm, CALL cs)
          Returns an array containing all possible methods called by method m at the call site cs.
 CALL[] getCallSites(HMethod hm)
          Returns a list of all the CALLs quads in the code of hm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmartCallGraph

public SmartCallGraph(MetaCallGraph mcg)
Creates a SmartCallGraph.

Method Detail

calls

public final HMethod[] calls(HMethod hm)
Returns an array containing all possible methods called by method m. If hm doesn't call any method, return an array of length 0.

Specified by:
calls in interface CallGraph

calls

public final HMethod[] calls(HMethod hm,
                             CALL cs)
Returns an array containing all possible methods called by method m at the call site cs. If there is no known callee for the call site cs>/code>, or if cs doesn't belong to the code of hm, return an array pof length 0.

Specified by:
calls in interface CallGraph

getCallSites

public CALL[] getCallSites(HMethod hm)
Returns a list of all the CALLs quads in the code of hm.

Specified by:
getCallSites in interface CallGraph

callableMethods

public Set callableMethods()
Returns the set of all the methods that can be called in the execution of the program.

Specified by:
callableMethods in interface CallGraph