Class MethodInvocation.DynamicInvocation

java.lang.Object
net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
net.bytebuddy.implementation.bytecode.member.MethodInvocation.DynamicInvocation
All Implemented Interfaces:
StackManipulation
Enclosing class:
MethodInvocation

@Enhance(includeSyntheticFields=true) protected class MethodInvocation.DynamicInvocation extends StackManipulation.AbstractBase
Performs a dynamic method invocation of the given method.
  • Field Details

    • methodName

      private final String methodName
      The internal name of the method that is to be bootstrapped.
    • returnType

      private final TypeDescription returnType
      The return type of the method to be bootstrapped.
    • parameterTypes

      private final List<? extends TypeDescription> parameterTypes
      The parameter types of the method to be bootstrapped.
    • bootstrapMethod

      private final MethodDescription.InDefinedShape bootstrapMethod
      The bootstrap method.
    • arguments

      private final List<? extends JavaConstant> arguments
      The list of arguments to be handed over to the bootstrap method.
  • Constructor Details

    • DynamicInvocation

      public DynamicInvocation(String methodName, TypeDescription returnType, List<? extends TypeDescription> parameterTypes, MethodDescription.InDefinedShape bootstrapMethod, List<? extends JavaConstant> arguments)
      Creates a new dynamic method invocation.
      Parameters:
      methodName - The internal name of the method that is to be bootstrapped.
      returnType - The return type of the method to be bootstrapped.
      parameterTypes - The type of the parameters to be bootstrapped.
      bootstrapMethod - The bootstrap method.
      arguments - The list of arguments to be handed over to the bootstrap method.
  • Method Details

    • apply

      public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext)
      Applies the stack manipulation that is described by this instance.
      Parameters:
      methodVisitor - The method visitor used to write the method implementation to.
      implementationContext - The context of the current implementation.
      Returns:
      The changes to the size of the operand stack that are implied by this stack manipulation.