Class Invokedynamic

java.lang.Object
net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
net.bytebuddy.implementation.bytecode.member.Invokedynamic
All Implemented Interfaces:
StackManipulation

@Enhance public class Invokedynamic extends StackManipulation.AbstractBase
A stack manipulation for an invokedynamic invocation.
  • Field Details

    • name

      private final String name
      The name of the invokedynamic expression.
    • type

      private final JavaConstant.MethodType type
      The type that is requested for the target.
    • bootstrap

      private final JavaConstant.MethodHandle bootstrap
      A handle to the bootstrap method.
    • arguments

      private final List<? extends JavaConstant> arguments
      The constant arguments to the bootstrap method.
  • Constructor Details

    • Invokedynamic

      public Invokedynamic(String name, JavaConstant.MethodType type, JavaConstant.MethodHandle bootstrap, List<? extends JavaConstant> arguments)
      Creates a stack manipulation for a bootstrap method.
      Parameters:
      name - The name of the invokedynamic expression.
      type - The type that is requested for the target.
      bootstrap - A handle to the bootstrap method.
      arguments - The constant arguments 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.