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 classFieldAccessor.FieldLocation.Relative.PreparedA 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.FactoryfieldLocatorFactoryThe field locator factory to use.private java.util.List<? extends FieldAccessor.FieldNameExtractor>fieldNameExtractorsThe field name extractors to use in their application order.
-
Constructor Summary
Constructors Modifier Constructor Description protectedRelative(java.util.List<? extends FieldAccessor.FieldNameExtractor> fieldNameExtractors)Creates a new relative field location.privateRelative(java.util.List<? extends FieldAccessor.FieldNameExtractor> fieldNameExtractors, FieldLocator.Factory fieldLocatorFactory)Creates a new relative field location.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldAccessor.FieldLocation.Preparedprepare(TypeDescription instrumentedType)A prepared field location.FieldAccessor.FieldLocationwith(FieldLocator.Factory fieldLocatorFactory)Specifies a field locator factory to use.
-
-
-
Field Detail
-
fieldNameExtractors
private final java.util.List<? extends FieldAccessor.FieldNameExtractor> fieldNameExtractors
The field name extractors to use in their application order.
-
fieldLocatorFactory
private final FieldLocator.Factory fieldLocatorFactory
The field locator factory to use.
-
-
Constructor Detail
-
Relative
protected Relative(java.util.List<? extends FieldAccessor.FieldNameExtractor> fieldNameExtractors)
Creates a new relative field location.- Parameters:
fieldNameExtractors- The field name extractors to use in their application order.
-
Relative
private Relative(java.util.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 Detail
-
with
public FieldAccessor.FieldLocation with(FieldLocator.Factory fieldLocatorFactory)
Specifies a field locator factory to use.- Specified by:
within 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:
preparein interfaceFieldAccessor.FieldLocation- Parameters:
instrumentedType- The instrumented type.- Returns:
- A prepared field location.
-
-