Class Entrypoint

java.lang.Object
com.ibm.wala.ipa.callgraph.Entrypoint
All Implemented Interfaces:
BytecodeConstants
Direct Known Subclasses:
ArgumentTypeEntrypoint, DefaultEntrypoint, ScriptEntryPoints.ScriptEntryPoint

public abstract class Entrypoint extends Object implements BytecodeConstants
A representation of an entrypoint in the call graph.
  • Field Details

    • method

      protected final IMethod method
      The method to be called
  • Constructor Details

    • Entrypoint

      protected Entrypoint(IMethod method)
      Parameters:
      method - the method to be called for this entrypoint
    • Entrypoint

      protected Entrypoint(MethodReference method, IClassHierarchy cha)
  • Method Details

    • makeSite

      public CallSiteReference makeSite(int programCounter)
      Create a call site reference representing a call to this entrypoint
      Parameters:
      programCounter - the bytecode index of the synthesize call
      Returns:
      the call site reference, or null if failed to find entrypoint
    • makeArgument

      protected int makeArgument(AbstractRootMethod m, int i)
      Add allocation statements to the fake root method for each possible value of parameter i. If necessary, add a phi to combine the values.
      Returns:
      value number holding the parameter to the call; -1 if there was some error
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • addCall

      Add a call to this entrypoint from the fake root method
      Parameters:
      m - the Fake Root Method
      Returns:
      the call instruction added, or null if the operation fails
    • getMethod

      public IMethod getMethod()
      Returns:
      the method this call invokes
    • getParameterTypes

      public abstract TypeReference[] getParameterTypes(int i)
      Returns:
      types to allocate for parameter i; for non-static methods, parameter 0 is "this"
    • getNumberOfParameters

      public abstract int getNumberOfParameters()
      Returns:
      number of parameters to this call, including "this" for non-statics
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object