Package net.bytebuddy.agent.builder
Class AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender
-
- All Implemented Interfaces:
ByteCodeAppender
- Enclosing class:
- AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation
@Enhance protected static class AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender extends java.lang.Object implements ByteCodeAppender
An appender for a lambda expression's functional method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.ByteCodeAppender
ByteCodeAppender.Compound, ByteCodeAppender.Simple, ByteCodeAppender.Size
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<FieldDescription.InDefinedShape>
declaredFields
The instrumented type's declared fields.private JavaConstant.MethodType
specializedLambdaMethod
The specialized type of the lambda method.private MethodDescription
targetMethod
The target method of the lambda expression.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Appender(MethodDescription targetMethod, JavaConstant.MethodType specializedLambdaMethod, java.util.List<FieldDescription.InDefinedShape> declaredFields)
Creates an appender of a lambda expression's functional method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteCodeAppender.Size
apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, MethodDescription instrumentedMethod)
Applies this byte code appender to a type creation process.
-
-
-
Field Detail
-
targetMethod
private final MethodDescription targetMethod
The target method of the lambda expression.
-
specializedLambdaMethod
private final JavaConstant.MethodType specializedLambdaMethod
The specialized type of the lambda method.
-
declaredFields
private final java.util.List<FieldDescription.InDefinedShape> declaredFields
The instrumented type's declared fields.
-
-
Constructor Detail
-
Appender
protected Appender(MethodDescription targetMethod, JavaConstant.MethodType specializedLambdaMethod, java.util.List<FieldDescription.InDefinedShape> declaredFields)
Creates an appender of a lambda expression's functional method.- Parameters:
targetMethod
- The target method of the lambda expression.specializedLambdaMethod
- The specialized type of the lambda method.declaredFields
- The instrumented type's declared fields.
-
-
Method Detail
-
apply
public ByteCodeAppender.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext, MethodDescription instrumentedMethod)
Applies this byte code appender to a type creation process.- Specified by:
apply
in interfaceByteCodeAppender
- Parameters:
methodVisitor
- The method visitor to which the byte code appender writes its code to.implementationContext
- The implementation context of the current type creation process.instrumentedMethod
- The method that is the target of the instrumentation.- Returns:
- The required size for the applied byte code to run.
-
-