public abstract static class Advice.Dispatcher.OffsetMapping.ForField extends Object implements Advice.Dispatcher.OffsetMapping
Modifier and Type | Class and Description |
---|---|
protected static class |
Advice.Dispatcher.OffsetMapping.ForField.Factory
A factory for a
Advice.Dispatcher.OffsetMapping.Target.ForField offset mapping. |
protected static class |
Advice.Dispatcher.OffsetMapping.ForField.WithExplicitType
An offset mapping for a field with an explicit declaring type.
|
protected static class |
Advice.Dispatcher.OffsetMapping.ForField.WithImplicitType
An offset mapping for a field with an implicit declaring type.
|
Advice.Dispatcher.OffsetMapping.Context, Advice.Dispatcher.OffsetMapping.ForAllArguments, Advice.Dispatcher.OffsetMapping.ForArgument, Advice.Dispatcher.OffsetMapping.ForEnterValue, Advice.Dispatcher.OffsetMapping.ForField, Advice.Dispatcher.OffsetMapping.ForInstrumentedMethod, Advice.Dispatcher.OffsetMapping.ForInstrumentedType, Advice.Dispatcher.OffsetMapping.ForOrigin, Advice.Dispatcher.OffsetMapping.ForReturnValue, Advice.Dispatcher.OffsetMapping.ForStubValue, Advice.Dispatcher.OffsetMapping.ForThisReference, Advice.Dispatcher.OffsetMapping.ForThrowable, Advice.Dispatcher.OffsetMapping.ForUnusedValue, Advice.Dispatcher.OffsetMapping.ForUserValue<T extends Annotation>, Advice.Dispatcher.OffsetMapping.Illegal, Advice.Dispatcher.OffsetMapping.Target
Modifier and Type | Field and Description |
---|---|
protected String |
name
The name of the field.
|
protected boolean |
readOnly
true if this mapping is read-only. |
protected TypeDescription.Generic |
target
The expected type that the field can be assigned to.
|
protected Assigner.Typing |
typing
The typing to apply.
|
Modifier | Constructor and Description |
---|---|
protected |
ForField(TypeDescription.Generic target,
String name,
boolean readOnly,
Assigner.Typing typing)
Creates an offset mapping for a field.
|
Modifier and Type | Method and Description |
---|---|
protected abstract FieldLocator |
fieldLocator(TypeDescription instrumentedType)
Returns a field locator for this instance.
|
Advice.Dispatcher.OffsetMapping.Target |
resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
Assigner assigner,
Advice.Dispatcher.OffsetMapping.Context context)
Resolves an offset mapping to a given target offset.
|
protected final TypeDescription.Generic target
protected final String name
protected final boolean readOnly
true
if this mapping is read-only.protected final Assigner.Typing typing
protected ForField(TypeDescription.Generic target, String name, boolean readOnly, Assigner.Typing typing)
target
- The target type.name
- The name of the field.readOnly
- true
if this mapping is read-only.typing
- The typing to apply.public Advice.Dispatcher.OffsetMapping.Target resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Assigner assigner, Advice.Dispatcher.OffsetMapping.Context context)
Advice.Dispatcher.OffsetMapping
resolve
in interface Advice.Dispatcher.OffsetMapping
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method for which the mapping is to be resolved.assigner
- The assigner to use.context
- The context in which the offset mapping is applied.protected abstract FieldLocator fieldLocator(TypeDescription instrumentedType)
instrumentedType
- The instrumented type.Copyright © 2014–2017. All rights reserved.