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 Object
implements Implementation
Implements a lambda expression's functional method.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected 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
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JavaConstant.MethodType
The specialized type of the lambda method.private final JavaConstant.MethodHandle
The handle of the target method of the lambda expression.private final TypeDescription
The type that defines the lambda expression. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
LambdaMethodImplementation
(TypeDescription targetType, JavaConstant.MethodHandle targetMethod, JavaConstant.MethodType specializedLambdaMethod) Creates a implementation of a lambda expression's functional method. -
Method Summary
Modifier and TypeMethodDescriptionappender
(Implementation.Target implementationTarget) Creates a byte code appender that determines the implementation of the instrumented type's methods.prepare
(InstrumentedType instrumentedType) Prepares a given instrumented type.
-
Field Details
-
targetType
The type that defines the lambda expression. -
targetMethod
The handle of the target method of the lambda expression. -
specializedLambdaMethod
The specialized type of the lambda method.
-
-
Constructor Details
-
LambdaMethodImplementation
protected LambdaMethodImplementation(TypeDescription targetType, JavaConstant.MethodHandle targetMethod, JavaConstant.MethodType specializedLambdaMethod) Creates a implementation of a lambda expression's functional method.- Parameters:
targetType
- The type that defines the lambda expression.targetMethod
- The target method of the lambda expression.specializedLambdaMethod
- The specialized type of the lambda method.
-
-
Method Details
-
appender
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
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.
-