Class MethodType


public final class MethodType extends ReferenceType
  • Method Details

    • create

      public static MethodType create(@NonNull String methodDescriptor)
      Returns the Java type corresponding to the given method descriptor.
    • getClassName

      @NonNull public String getClassName()
      Description copied from class: JavaType
      Returns the binary name of the class corresponding to this type. This method must not be used on method types.
      Specified by:
      getClassName in class JavaType
    • getSize

      public int getSize()
      Description copied from class: JavaType
      Returns the size of values of this type. This method must not be used for method types.
      Overrides:
      getSize in class ReferenceType
      Returns:
      the size of values of this type, i.e., 2 for long and double, 0 for void and 1 otherwise.
    • getOpcode

      public int getOpcode(int opcode)
      Description copied from class: JavaType
      Returns a JVM instruction opcode adapted to this Java type. This method must not be used for method types.
      Overrides:
      getOpcode in class ReferenceType
      Parameters:
      opcode - a JVM instruction opcode. This opcode must be one of ILOAD, ISTORE, IALOAD, IASTORE, IADD, ISUB, IMUL, IDIV, IREM, INEG, ISHL, ISHR, IUSHR, IAND, IOR, IXOR and IRETURN.
      Returns:
      an opcode that is similar to the given opcode, but adapted to this Java type. For example, if this type is float and opcode is IRETURN, this method returns FRETURN.