@HashCodeAndEqualsPlugin.Enhance protected static class AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.SerializationImplementation extends java.lang.Object implements Implementation
writeReplace
method for serializable lambda expressions.Implementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Target
Modifier and Type | Field and Description |
---|---|
private JavaConstant.MethodType |
lambdaMethod
The method type of the lambda expression's functional method.
|
private java.lang.String |
lambdaMethodName
The lambda expression's functional method name.
|
private TypeDescription |
lambdaType
The lambda expression's functional type.
|
private JavaConstant.MethodType |
specializedMethod
The specialized method type of the lambda expression's functional method.
|
private JavaConstant.MethodHandle |
targetMethod
A handle that references the lambda expressions invocation target.
|
private TypeDescription |
targetType
The lambda expression's declaring type.
|
Modifier | Constructor and Description |
---|---|
protected |
SerializationImplementation(TypeDescription targetType,
TypeDescription lambdaType,
java.lang.String lambdaMethodName,
JavaConstant.MethodType lambdaMethod,
JavaConstant.MethodHandle targetMethod,
JavaConstant.MethodType specializedMethod)
Creates a new implementation for a serializable's lambda expression's
writeReplace method. |
Modifier and Type | Method and 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.
|
private final TypeDescription targetType
private final TypeDescription lambdaType
private final java.lang.String lambdaMethodName
private final JavaConstant.MethodType lambdaMethod
private final JavaConstant.MethodHandle targetMethod
private final JavaConstant.MethodType specializedMethod
protected SerializationImplementation(TypeDescription targetType, TypeDescription lambdaType, java.lang.String lambdaMethodName, JavaConstant.MethodType lambdaMethod, JavaConstant.MethodHandle targetMethod, JavaConstant.MethodType specializedMethod)
writeReplace
method.targetType
- The lambda expression's declaring type.lambdaType
- The lambda expression's functional type.lambdaMethodName
- The lambda expression's functional method name.lambdaMethod
- The method type of the lambda expression's functional method.targetMethod
- A handle that references the lambda expressions invocation target.specializedMethod
- The specialized method type of the lambda expression's functional method.public ByteCodeAppender appender(Implementation.Target implementationTarget)
appender
in interface Implementation
implementationTarget
- The target of the current implementation.InstrumentedType.Prepareable.prepare(InstrumentedType)
.public InstrumentedType prepare(InstrumentedType instrumentedType)
prepare
in interface InstrumentedType.Prepareable
instrumentedType
- The instrumented type in its current form.