Enum MethodInvocation

java.lang.Object
java.lang.Enum<MethodInvocation>
net.bytebuddy.implementation.bytecode.member.MethodInvocation
All Implemented Interfaces:
Serializable, Comparable<MethodInvocation>, java.lang.constant.Constable

public enum MethodInvocation extends Enum<MethodInvocation>
A builder for a method invocation.
  • Enum Constant Details

    • VIRTUAL

      public static final MethodInvocation VIRTUAL
      A virtual method invocation.
    • INTERFACE

      public static final MethodInvocation INTERFACE
      An interface-typed virtual method invocation.
    • STATIC

      public static final MethodInvocation STATIC
      A static method invocation.
    • SPECIAL

      public static final MethodInvocation SPECIAL
      A specialized pseudo-virtual method invocation for a non-constructor.
    • SPECIAL_CONSTRUCTOR

      public static final MethodInvocation SPECIAL_CONSTRUCTOR
      A specialized pseudo-virtual method invocation for a constructor.
    • VIRTUAL_PRIVATE

      public static final MethodInvocation VIRTUAL_PRIVATE
      A private method call that is potentially virtual.
    • INTERFACE_PRIVATE

      public static final MethodInvocation INTERFACE_PRIVATE
      A private method call that is potentially virtual on an interface type.
  • Method Details

    • values

      public static MethodInvocation[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static MethodInvocation valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • invoke

      Creates a method invocation with an implicitly determined invocation type.
      Parameters:
      methodDescription - The method to be invoked.
      Returns:
      A stack manipulation with implicitly determined invocation type.
    • invoke

      public static MethodInvocation.WithImplicitInvocationTargetType invoke(MethodDescription methodDescription)
      Creates a method invocation with an implicitly determined invocation type. If the method's return type derives from its declared shape, the value is additionally casted to the value of the generically resolved method.
      Parameters:
      methodDescription - The method to be invoked.
      Returns:
      A stack manipulation with implicitly determined invocation type.
    • lookup

      public static StackManipulation lookup()
      Returns a method invocation of java.lang.invoke.MethodHandles#lookup().
      Returns:
      A method invocation for resolving the current lookup.