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
Fields Modifier and Type Field Description private MethodDescription.InDefinedShape
invokeExact
A description ofjava.lang.invoke.MethodHandle#invokeExact(Object...)
.
-
Constructor Summary
Constructors Modifier Constructor Description protected
UsingMethodHandle(MethodDescription.InDefinedShape invokeExact)
Creates a new dispatcher that is using a method handle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackManipulation.Size
apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext)
Applies the stack manipulation that is described by this instance.StackManipulation
initialize()
Initializes this invocation.StackManipulation
invoke(MethodDescription methodDescription)
Invokes this invocation.-
Methods inherited from class net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
isValid
-
-
-
-
Field Detail
-
invokeExact
private final MethodDescription.InDefinedShape invokeExact
A description ofjava.lang.invoke.MethodHandle#invokeExact(Object...)
.
-
-
Constructor Detail
-
UsingMethodHandle
protected UsingMethodHandle(MethodDescription.InDefinedShape invokeExact)
Creates a new dispatcher that is using a method handle.- Parameters:
invokeExact
- A description ofjava.lang.invoke.MethodHandle#invokeExact(Object...)
.
-
-
Method Detail
-
initialize
public StackManipulation initialize()
Initializes this invocation.- Specified by:
initialize
in interfaceAgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher
- Returns:
- A stack manipulation that represents the initialization.
-
invoke
public StackManipulation invoke(MethodDescription methodDescription)
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.
-
-