@HashCodeAndEqualsPlugin.Enhance protected static class AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.BridgeMethodImplementation
Implements an explicit bridge method for a lambda expression.
|
protected static class |
AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.ConstructorImplementation
Implements a lambda class's executing transformer.
|
protected static class |
AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.FactoryImplementation
An implementation of a instance factory for a lambda expression's class.
|
protected static class |
AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation
Implements a lambda expression's functional method.
|
protected static class |
AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.SerializationImplementation
Implements the
writeReplace method for serializable lambda expressions. |
Modifier and Type | Field and Description |
---|---|
private ByteBuddy |
byteBuddy
The Byte Buddy instance to use for creating lambda objects.
|
private static java.lang.String |
FIELD_PREFIX
A prefix for a field that represents a property of a lambda expression.
|
private static java.lang.String |
LAMBDA_FACTORY
The name of a factory for a lambda expression.
|
private static java.util.concurrent.atomic.AtomicInteger |
LAMBDA_NAME_COUNTER
A counter for naming lambda expressions randomly.
|
private static java.lang.String |
LAMBDA_TYPE_INFIX
The infix to use for naming classes that represent lambda expression.
|
private static java.lang.Class<?> |
NOT_PREVIOUSLY_DEFINED
A type-safe constant to express that a class is not already loaded when applying a class file transformer.
|
Modifier | Constructor and Description |
---|---|
protected |
LambdaInstanceFactory(ByteBuddy byteBuddy)
Creates a new lambda instance factory.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
make(java.lang.Object targetTypeLookup,
java.lang.String lambdaMethodName,
java.lang.Object factoryMethodType,
java.lang.Object lambdaMethodType,
java.lang.Object targetMethodHandle,
java.lang.Object specializedLambdaMethodType,
boolean serializable,
java.util.List<java.lang.Class<?>> markerInterfaces,
java.util.List<?> additionalBridges,
java.util.Collection<? extends java.lang.instrument.ClassFileTransformer> classFileTransformers)
Applies this lambda meta factory.
|
private static final java.lang.String LAMBDA_FACTORY
private static final java.lang.String FIELD_PREFIX
private static final java.lang.String LAMBDA_TYPE_INFIX
private static final java.lang.Class<?> NOT_PREVIOUSLY_DEFINED
private static final java.util.concurrent.atomic.AtomicInteger LAMBDA_NAME_COUNTER
private final ByteBuddy byteBuddy
protected LambdaInstanceFactory(ByteBuddy byteBuddy)
byteBuddy
- The Byte Buddy instance to use for creating lambda objects.public byte[] make(java.lang.Object targetTypeLookup, java.lang.String lambdaMethodName, java.lang.Object factoryMethodType, java.lang.Object lambdaMethodType, java.lang.Object targetMethodHandle, java.lang.Object specializedLambdaMethodType, boolean serializable, java.util.List<java.lang.Class<?>> markerInterfaces, java.util.List<?> additionalBridges, java.util.Collection<? extends java.lang.instrument.ClassFileTransformer> classFileTransformers)
targetTypeLookup
- A lookup context representing the creating class of this lambda expression.lambdaMethodName
- The name of the lambda expression's represented method.factoryMethodType
- The type of the lambda expression's represented method.lambdaMethodType
- The type of the lambda expression's factory method.targetMethodHandle
- A handle representing the target of the lambda expression's method.specializedLambdaMethodType
- A specialization of the type of the lambda expression's represented method.serializable
- true
if the lambda expression should be serializable.markerInterfaces
- A list of interfaces for the lambda expression to represent.additionalBridges
- A list of additional bridge methods to be implemented by the lambda expression.classFileTransformers
- A collection of class file transformers to apply when creating the class.