Class FieldAccessor.ForSetter.OfReferenceValue

All Implemented Interfaces:
InstrumentedType.Prepareable, Implementation, Implementation.Composable
Enclosing class:
FieldAccessor.ForSetter<T>

@Enhance protected static class FieldAccessor.ForSetter.OfReferenceValue extends FieldAccessor.ForSetter<FieldDescription.InDefinedShape>
An instrumentation that sets a field to a reference value that is stored in a static field of the instrumented type.
  • Field Details

    • PREFIX

      protected static final String PREFIX
      The prefix used for implicitly named cached fields.
      See Also:
    • value

      private final Object value
      The value to store.
    • name

      private final String name
      The name of the field to store the reference in.
  • Constructor Details

    • OfReferenceValue

      protected OfReferenceValue(FieldAccessor.FieldLocation fieldLocation, Assigner assigner, Assigner.Typing typing, FieldAccessor.ForSetter.TerminationHandler terminationHandler, Object value, String name)
      Creates a setter instrumentation for setting a value stored in a static field of the instrumented type.
      Parameters:
      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.
  • Method Details