Interface MethodInvocation.WithImplicitInvocationTargetType

All Superinterfaces:
StackManipulation
All Known Implementing Classes:
MethodInvocation.IllegalInvocation, MethodInvocation.Invocation, MethodInvocation.OfGenericMethod
Enclosing class:
MethodInvocation

public static interface MethodInvocation.WithImplicitInvocationTargetType extends StackManipulation
Represents a method invocation where the invocation type (static, virtual, special, interface) is derived from the given method's description.
  • Method Details

    • virtual

      StackManipulation virtual(TypeDescription invocationTarget)
      Transforms this method invocation into a virtual (or interface) method invocation on the given type.
      Parameters:
      invocationTarget - The type on which the method is to be invoked virtually on.
      Returns:
      A stack manipulation representing this method invocation.
    • special

      StackManipulation special(TypeDescription invocationTarget)
      Transforms this method invocation into a special invocation on the given type.
      Parameters:
      invocationTarget - The type on which the method is to be invoked specially on.
      Returns:
      A stack manipulation representing this method invocation.
    • dynamic

      StackManipulation dynamic(String methodName, TypeDescription returnType, List<? extends TypeDescription> methodType, List<? extends JavaConstant> arguments)
      Invokes the method as a bootstrap method to bind a call site with the given properties. Note that the Java virtual machine currently only knows how to resolve bootstrap methods that link static methods or a constructor.
      Parameters:
      methodName - The name of the method to be bound.
      returnType - The return type of the method to be bound.
      methodType - The parameter types of the method to be bound.
      arguments - The arguments to be passed to the bootstrap method.
      Returns:
      A stack manipulation that represents the dynamic method invocation.
    • onHandle

      Invokes the method via a MethodHandle.
      Parameters:
      type - The type of invocation.
      Returns:
      A stack manipulation that represents a method call of the specified method via a method handle.