Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField
- java.lang.Object
-
- net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField
-
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
- Direct Known Subclasses:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField.Resolved
,MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField.Unresolved
- Enclosing interface:
- MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
@Enhance public abstract static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField extends java.lang.Object implements MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
An offset mapping for a field value.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField.Resolved
An offset mapping for a resolved field access.static class
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField.Unresolved
An offset mapping for an unresolved field value.-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T extends java.lang.annotation.Annotation>, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForAllArguments, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForArgument, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForCurrent, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForSelfCallHandle, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStubValue, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference
-
-
Field Summary
Fields Modifier and Type Field Description private static MethodDescription.InDefinedShape
FIELD_VALUE_DECLARING_TYPE
TheMemberSubstitution.FieldValue.declaringType()
property.private static MethodDescription.InDefinedShape
FIELD_VALUE_TYPING
TheMemberSubstitution.FieldValue.typing()
property.private static MethodDescription.InDefinedShape
FIELD_VALUE_VALUE
TheMemberSubstitution.FieldValue.value()
property.private TypeDescription.Generic
target
A description of the targeted type.private Assigner.Typing
typing
The typing to use ornull
if implicit typing.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForField(TypeDescription.Generic target, Assigner.Typing typing)
Creates an offset mapping for a field value.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract FieldDescription
resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod)
Resolves a description of the field being accessed.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved
resolve(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod)
Resolves an offset mapping for a given instrumented method.
-
-
-
Field Detail
-
FIELD_VALUE_VALUE
private static final MethodDescription.InDefinedShape FIELD_VALUE_VALUE
TheMemberSubstitution.FieldValue.value()
property.
-
FIELD_VALUE_DECLARING_TYPE
private static final MethodDescription.InDefinedShape FIELD_VALUE_DECLARING_TYPE
TheMemberSubstitution.FieldValue.declaringType()
property.
-
FIELD_VALUE_TYPING
private static final MethodDescription.InDefinedShape FIELD_VALUE_TYPING
TheMemberSubstitution.FieldValue.typing()
property.
-
target
private final TypeDescription.Generic target
A description of the targeted type.
-
typing
@MaybeNull @ValueHandling(REVERSE_NULLABILITY) private final Assigner.Typing typing
The typing to use ornull
if implicit typing.
-
-
Constructor Detail
-
ForField
protected ForField(TypeDescription.Generic target, @MaybeNull Assigner.Typing typing)
Creates an offset mapping for a field value.- Parameters:
target
- A description of the targeted type.typing
- The typing to use ornull
if implicit typing.
-
-
Method Detail
-
resolve
public MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved resolve(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod)
Resolves an offset mapping for a given instrumented method.- Specified by:
resolve
in interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
- Parameters:
assigner
- The assigner to use.typing
- The typing to use if no explicit typing is specified.instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.- Returns:
- A resolved version of this offset mapping.
-
resolve
protected abstract FieldDescription resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod)
Resolves a description of the field being accessed.- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.- Returns:
- A description of the field being accessed.
-
-