@HashCodeAndEqualsPlugin.Enhance protected static class FieldAccessor.ForSetter.OfReferenceValue extends FieldAccessor.ForSetter<FieldDescription.InDefinedShape>
FieldAccessor.ForSetter.Appender, FieldAccessor.ForSetter.OfConstantValue, FieldAccessor.ForSetter.OfDefaultValue, FieldAccessor.ForSetter.OfFieldValue, FieldAccessor.ForSetter.OfParameterValue, FieldAccessor.ForSetter.OfReferenceValue, FieldAccessor.ForSetter.TerminationHandler
FieldAccessor.AssignerConfigurable, FieldAccessor.FieldLocation, FieldAccessor.FieldNameExtractor, FieldAccessor.ForImplicitProperty, FieldAccessor.ForSetter<T>, FieldAccessor.OwnerTypeLocatable, FieldAccessor.PropertyConfigurable
Implementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Target
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name
The name of the field to store the reference in.
|
protected static java.lang.String |
PREFIX
The prefix used for implicitly named cached fields.
|
private java.lang.Object |
value
The value to store.
|
assigner, fieldLocation, typing
Modifier | Constructor and Description |
---|---|
protected |
OfReferenceValue(FieldAccessor.FieldLocation fieldLocation,
Assigner assigner,
Assigner.Typing typing,
FieldAccessor.ForSetter.TerminationHandler terminationHandler,
java.lang.Object value,
java.lang.String name)
Creates a setter instrumentation for setting a value stored in a static field of the instrumented type.
|
Modifier and Type | Method and Description |
---|---|
Implementation.Composable |
andThen(Implementation.Composable implementation)
Appends the supplied composable implementation to this implementation.
|
Implementation |
andThen(Implementation implementation)
Appends the supplied implementation to this implementation.
|
protected FieldDescription.InDefinedShape |
initialize(TypeDescription instrumentedType)
Initializes a value to be used during method instrumentation.
|
InstrumentedType |
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
|
protected StackManipulation |
resolve(FieldDescription.InDefinedShape target,
FieldDescription fieldDescription,
TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves the stack manipulation to load the value being set.
|
appender
of, of, of, ofBeanProperty, ofField
protected static final java.lang.String PREFIX
private final java.lang.Object value
private final java.lang.String name
protected OfReferenceValue(FieldAccessor.FieldLocation fieldLocation, Assigner assigner, Assigner.Typing typing, FieldAccessor.ForSetter.TerminationHandler terminationHandler, java.lang.Object value, java.lang.String name)
fieldLocation
- The field's location.assigner
- The assigner to use.typing
- Indicates if dynamic type castings should be attempted for incompatible assignments.terminationHandler
- The termination handler to apply.value
- The value to store.name
- The name of the field to store the reference in.public InstrumentedType prepare(InstrumentedType instrumentedType)
instrumentedType
- The instrumented type in its current form.protected FieldDescription.InDefinedShape initialize(TypeDescription instrumentedType)
initialize
in class FieldAccessor.ForSetter<FieldDescription.InDefinedShape>
instrumentedType
- The instrumented type.protected StackManipulation resolve(FieldDescription.InDefinedShape target, FieldDescription fieldDescription, TypeDescription instrumentedType, MethodDescription instrumentedMethod)
resolve
in class FieldAccessor.ForSetter<FieldDescription.InDefinedShape>
target
- The method that was initialized for the instrumented type.fieldDescription
- The field to set the value for.instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.public Implementation andThen(Implementation implementation)
implementation
- The subsequent implementation.public Implementation.Composable andThen(Implementation.Composable implementation)
implementation
- The subsequent composable implementation.