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 FieldAccessor.FieldNameExtractor
The field name extractor to use. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Relative
(FieldAccessor.FieldNameExtractor fieldNameExtractor) Creates a new relative field location.private
Relative
(FieldAccessor.FieldNameExtractor fieldNameExtractor, 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
-
fieldNameExtractor
The field name extractor to use. -
fieldLocatorFactory
The field locator factory to use.
-
-
Constructor Details
-
Relative
Creates a new relative field location.- Parameters:
fieldNameExtractor
- The field name extractor to use.
-
Relative
private Relative(FieldAccessor.FieldNameExtractor fieldNameExtractor, FieldLocator.Factory fieldLocatorFactory) Creates a new relative field location.- Parameters:
fieldNameExtractor
- The field name extractor to use.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.
-