Package net.bytebuddy.agent.builder
Class AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.BridgeMethodImplementation
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.BridgeMethodImplementation
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,Implementation
- Enclosing class:
- AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory
@Enhance protected static class AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.BridgeMethodImplementation extends java.lang.Object implements Implementation
Implements an explicit bridge method for a lambda expression.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.BridgeMethodImplementation.Appender
An appender for implementing a bridge method for a lambda expression.-
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
lambdaMethod
The actual type of the lambda expression's functional method.private java.lang.String
lambdaMethodName
The name of the lambda expression's functional method.
-
Constructor Summary
Constructors Modifier Constructor Description protected
BridgeMethodImplementation(java.lang.String lambdaMethodName, JavaConstant.MethodType lambdaMethod)
Creates a new bridge method implementation for a lambda expression.
-
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
-
lambdaMethodName
private final java.lang.String lambdaMethodName
The name of the lambda expression's functional method.
-
lambdaMethod
private final JavaConstant.MethodType lambdaMethod
The actual type of the lambda expression's functional method.
-
-
Constructor Detail
-
BridgeMethodImplementation
protected BridgeMethodImplementation(java.lang.String lambdaMethodName, JavaConstant.MethodType lambdaMethod)
Creates a new bridge method implementation for a lambda expression.- Parameters:
lambdaMethodName
- The name of the lambda expression's functional method.lambdaMethod
- The actual type of the lambda expression's functional 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.
-
-