Class JavaScriptFunctionApplyTargetSelector

java.lang.Object
com.ibm.wala.cast.js.ipa.callgraph.JavaScriptFunctionApplyTargetSelector
All Implemented Interfaces:
MethodTargetSelector

public class JavaScriptFunctionApplyTargetSelector extends Object implements MethodTargetSelector
We need to generate synthetic methods for Function.apply() in the target selector, so that the AstMethod for Function_prototype_apply() in the prologue doesn't actually get used in the CGNodes used for calls to Function.prototype.apply(). The generated dummy methods should never actually be used except as a stub.
  • Field Details

  • Constructor Details

    • JavaScriptFunctionApplyTargetSelector

      public JavaScriptFunctionApplyTargetSelector(MethodTargetSelector base)
  • Method Details

    • getCalleeTarget

      public IMethod getCalleeTarget(CGNode caller, CallSiteReference site, IClass receiver)
      Description copied from interface: MethodTargetSelector
      Given a calling node, a call site and (optionally) a dispatch type, return the target method to be called.
      Specified by:
      getCalleeTarget in interface MethodTargetSelector
      Parameters:
      caller - the GCNode in the call graph containing the call
      site - the call site reference of the call site
      receiver - the type of the target object or null
      Returns:
      the method to be called.