Package net.bytebuddy.agent.builder
Class AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher.UsingMethodHandle
java.lang.Object
net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
net.bytebuddy.agent.builder.AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher.UsingMethodHandle
- All Implemented Interfaces:
AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher
,StackManipulation
- Enclosing interface:
- AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher
@Enhance
public static class AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher.UsingMethodHandle
extends StackManipulation.AbstractBase
implements AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher
An invocation that is using an exact invocation of a method handle.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher
AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher.UsingDirectInvocation, AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher.UsingMethodHandle
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
StackManipulation.AbstractBase, StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Simple, StackManipulation.Size, StackManipulation.Trivial
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodDescription.InDefinedShape
A description ofjava.lang.invoke.MethodHandle#invokeExact(Object...)
. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
UsingMethodHandle
(MethodDescription.InDefinedShape invokeExact) Creates a new dispatcher that is using a method handle. -
Method Summary
Modifier and TypeMethodDescriptionapply
(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext) Applies the stack manipulation that is described by this instance.Initializes this invocation.invoke
(MethodDescription methodDescription) Invokes this invocation.Methods inherited from class net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
isValid
-
Field Details
-
invokeExact
A description ofjava.lang.invoke.MethodHandle#invokeExact(Object...)
.
-
-
Constructor Details
-
UsingMethodHandle
Creates a new dispatcher that is using a method handle.- Parameters:
invokeExact
- A description ofjava.lang.invoke.MethodHandle#invokeExact(Object...)
.
-
-
Method Details
-
initialize
Initializes this invocation.- Specified by:
initialize
in interfaceAgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher
- Returns:
- A stack manipulation that represents the initialization.
-
invoke
Invokes this invocation.- Specified by:
invoke
in interfaceAgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher
- Parameters:
methodDescription
- A description of the invoked method.- Returns:
- A stack manipulation that represents the invocation.
-
apply
public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext) Applies the stack manipulation that is described by this instance.- Specified by:
apply
in interfaceStackManipulation
- 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.
-