Interface IDCallInfo

All Superinterfaces:
IDElement, IDExpression, IDInvokeInfo, IInstructionOperand
All Known Subinterfaces:
IDNewInfo

public interface IDCallInfo extends IDInvokeInfo
dexdec IR invocation information used by invoke instructions to represent calls to methods.

Example:

 result = ob.foo(1, "blah");
          ^^^^^^^^^^^^^^^^^
 

Also refer to the specialized sub-interface IDNewInfo, to represent high-level "new-object" construction (= object allocation, followed by object initialization).

  • Method Details

    • getMethodSignature

      String getMethodSignature()
      Get the target method internal signature.
      Returns:
      an internal sinature, e.g. Lcom/abc/Foo;->bar(I)V
    • getMethodName

      String getMethodName()
      Convenience method to retrieve the target method simplename.
      Returns:
      the simple name, e.g. bar for a method Lcom/abc/Foo;->bar(I)V
    • getCountOfArguments

      int getCountOfArguments()
      Get the number of arguments. For non-static methods, this is counted.
      Returns:
    • hasThis

      boolean hasThis()
      Determine whether the first argument of this method should be the object's this. That is, this method is a convenient way to determine whether the invocation type is either DInvokeType.DIRECT, DInvokeType.SUPER, DInvokeType.VIRTUAL, or DInvokeType.INTERFACE.
      Returns:
    • getInvokeType

      DInvokeType getInvokeType()
      Get the invocation type. Note that this differs slightly from the JLS or Dalvik invoke-xxx semantics. Refer to the enumration for details.
      Returns:
    • setArgument

      void setArgument(int i, IDExpression arg)
      Update a method argument.
      Parameters:
      i -
      arg -
    • getArgument

      IDExpression getArgument(int index)
      Retrieve a method's argument.
      Parameters:
      index -
      Returns:
    • upgradeMistypedArguments

      void upgradeMistypedArguments(DTypeInfo ti, IDGlobalContext gctx)
      Apply types on the method parameters.

      Important note: at the IR level, casts should be explicit. Implicit promotions, not requiring a cast, are reserved for AST generation.

      Parameters:
      ti - optional type information object, used to record type updates and conflicts
      gctx - global IR context (mandatory)
    • duplicate

      IDCallInfo duplicate()
      Description copied from interface: IDElement
      Duplicate this element.
      Specified by:
      duplicate in interface IDElement
      Specified by:
      duplicate in interface IDExpression
      Specified by:
      duplicate in interface IDInvokeInfo
      Returns:
      a deep copy of this element; the type of the duplicated element should be the same as this element's type