Class DexBackedMethodReference

All Implemented Interfaces:
Comparable<MethodReference>, MethodReference, Reference

public class DexBackedMethodReference extends BaseMethodReference
  • Field Details

    • dexFile

      @Nonnull public final DexBackedDexFile dexFile
    • methodIndex

      private final int methodIndex
    • protoIdItemOffset

      private int protoIdItemOffset
  • Constructor Details

    • DexBackedMethodReference

      public DexBackedMethodReference(@Nonnull DexBackedDexFile dexFile, int methodIndex)
  • Method Details

    • getDefiningClass

      @Nonnull public String getDefiningClass()
      Description copied from interface: MethodReference
      Gets the type of the class that defines the referenced method.
      Returns:
      The type of the class that defines the referenced method
    • getName

      @Nonnull public String getName()
      Description copied from interface: MethodReference
      Gets the name of the referenced method.
      Returns:
      The name of the referenced method
    • getParameterTypes

      @Nonnull public List<String> getParameterTypes()
      Description copied from interface: MethodReference
      Gets a list of the types of the parameters of this method.
      Returns:
      A list of the parameter types of this method, as strings.
    • getReturnType

      @Nonnull public String getReturnType()
      Description copied from interface: MethodReference
      Gets the return type of the referenced method.
      Returns:
      The return type of the referenced method.
    • getProtoIdItemOffset

      private int getProtoIdItemOffset()
    • getSize

      public int getSize()
      Calculate and return the private size of a method reference. Calculated as: class_idx + proto_idx + name_idx
      Returns:
      size in bytes
    • validateReference

      public void validateReference() throws Reference.InvalidReferenceException
      Description copied from interface: Reference
      Verifies that this reference is valid.
      Specified by:
      validateReference in interface Reference
      Overrides:
      validateReference in class BaseReference
      Throws:
      Reference.InvalidReferenceException - If the reference is not valid.