Package net.bytebuddy.implementation
Class FieldAccessor.FieldLocation.Relative
java.lang.Object
net.bytebuddy.implementation.FieldAccessor.FieldLocation.Relative
- All Implemented Interfaces:
FieldAccessor.FieldLocation
- Enclosing interface:
FieldAccessor.FieldLocation
@Enhance
public static class FieldAccessor.FieldLocation.Relative
extends Object
implements FieldAccessor.FieldLocation
A relative field location where a field is located dynamically.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A prepared version of a field location.Nested classes/interfaces inherited from interface net.bytebuddy.implementation.FieldAccessor.FieldLocation
FieldAccessor.FieldLocation.Absolute, FieldAccessor.FieldLocation.Relative
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FieldLocator.Factory
The field locator factory to use.private final List
<? extends FieldAccessor.FieldNameExtractor> The field name extractors to use in their application order. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Relative
(List<? extends FieldAccessor.FieldNameExtractor> fieldNameExtractors) Creates a new relative field location.private
Relative
(List<? extends FieldAccessor.FieldNameExtractor> fieldNameExtractors, FieldLocator.Factory fieldLocatorFactory) Creates a new relative field location. -
Method Summary
Modifier and TypeMethodDescriptionprepare
(TypeDescription instrumentedType) A prepared field location.with
(FieldLocator.Factory fieldLocatorFactory) Specifies a field locator factory to use.
-
Field Details
-
fieldNameExtractors
The field name extractors to use in their application order. -
fieldLocatorFactory
The field locator factory to use.
-
-
Constructor Details
-
Relative
Creates a new relative field location.- Parameters:
fieldNameExtractors
- The field name extractors to use in their application order.
-
Relative
private Relative(List<? extends FieldAccessor.FieldNameExtractor> fieldNameExtractors, FieldLocator.Factory fieldLocatorFactory) Creates a new relative field location.- Parameters:
fieldNameExtractors
- The field name extractors to use in their application order.fieldLocatorFactory
- The field locator factory to use.
-
-
Method Details
-
with
Specifies a field locator factory to use.- Specified by:
with
in interfaceFieldAccessor.FieldLocation
- Parameters:
fieldLocatorFactory
- The field locator factory to use.- Returns:
- An appropriate field location.
-
prepare
A prepared field location.- Specified by:
prepare
in interfaceFieldAccessor.FieldLocation
- Parameters:
instrumentedType
- The instrumented type.- Returns:
- A prepared field location.
-