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 java.lang.Object implements FieldAccessor.FieldLocation
A relative field location where a field is located dynamically.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
FieldAccessor.FieldLocation.Relative.Prepared
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
Fields Modifier and Type Field Description private FieldLocator.Factory
fieldLocatorFactory
The field locator factory to use.private FieldAccessor.FieldNameExtractor
fieldNameExtractor
The field name extractor to use.
-
Constructor Summary
Constructors Modifier Constructor Description protected
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldAccessor.FieldLocation.Prepared
prepare(TypeDescription instrumentedType)
A prepared field location.FieldAccessor.FieldLocation
with(FieldLocator.Factory fieldLocatorFactory)
Specifies a field locator factory to use.
-
-
-
Field Detail
-
fieldNameExtractor
private final FieldAccessor.FieldNameExtractor fieldNameExtractor
The field name extractor to use.
-
fieldLocatorFactory
private final FieldLocator.Factory fieldLocatorFactory
The field locator factory to use.
-
-
Constructor Detail
-
Relative
protected Relative(FieldAccessor.FieldNameExtractor fieldNameExtractor)
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 Detail
-
with
public FieldAccessor.FieldLocation with(FieldLocator.Factory fieldLocatorFactory)
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
public FieldAccessor.FieldLocation.Prepared prepare(TypeDescription instrumentedType)
A prepared field location.- Specified by:
prepare
in interfaceFieldAccessor.FieldLocation
- Parameters:
instrumentedType
- The instrumented type.- Returns:
- A prepared field location.
-
-