Package net.bytebuddy.agent.builder
Class AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,Implementation
- Enclosing class:
- AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory
@Enhance protected static class AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation extends java.lang.Object implements Implementation
Implements a lambda expression's functional method.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender
An appender for a lambda expression's functional method.-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.Implementation
Implementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Target
-
-
Field Summary
Fields Modifier and Type Field Description private JavaConstant.MethodType
specializedLambdaMethod
The specialized type of the lambda method.private JavaConstant.MethodHandle
targetMethod
The handle of the target method of the lambda expression.
-
Constructor Summary
Constructors Modifier Constructor Description protected
LambdaMethodImplementation(JavaConstant.MethodHandle targetMethod, JavaConstant.MethodType specializedLambdaMethod)
Creates a implementation of a lambda expression's functional method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteCodeAppender
appender(Implementation.Target implementationTarget)
Creates a byte code appender that determines the implementation of the instrumented type's methods.InstrumentedType
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
-
-
-
Field Detail
-
targetMethod
private final JavaConstant.MethodHandle targetMethod
The handle of the target method of the lambda expression.
-
specializedLambdaMethod
private final JavaConstant.MethodType specializedLambdaMethod
The specialized type of the lambda method.
-
-
Constructor Detail
-
LambdaMethodImplementation
protected LambdaMethodImplementation(JavaConstant.MethodHandle targetMethod, JavaConstant.MethodType specializedLambdaMethod)
Creates a implementation of a lambda expression's functional method.- Parameters:
targetMethod
- The target method of the lambda expression.specializedLambdaMethod
- The specialized type of the lambda method.
-
-
Method Detail
-
appender
public ByteCodeAppender appender(Implementation.Target implementationTarget)
Creates a byte code appender that determines the implementation of the instrumented type's methods.- Specified by:
appender
in interfaceImplementation
- Parameters:
implementationTarget
- The target of the current implementation.- Returns:
- A byte code appender for implementing methods delegated to this implementation. This byte code appender
is also responsible for handling methods that were added by this implementation on the call to
InstrumentedType.Prepareable.prepare(InstrumentedType)
.
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.- Specified by:
prepare
in interfaceInstrumentedType.Prepareable
- Parameters:
instrumentedType
- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
-