Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference
- java.lang.Object
-
- net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference
-
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
- Enclosing interface:
- MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
@Enhance public static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference extends java.lang.Object implements MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
An offset mapping that assigns thethisreference.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference.FactoryA factory for creating an offset mapping for binding aMemberSubstitution.Thisreference.protected static classMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference.ResolvedA resolved offset mapping for resolving thethisreference.-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
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.ForDynamicConstant, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForField, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForHandle, 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 booleanoptionaltrueifnullor a primitive0should be assigned to the parameter if nothisreference is available.private MemberSubstitution.SourcesourceThe source providing the reference.private TypeDescription.GenerictargetTypeThe targeted type.private Assigner.TypingtypingThe typing to use ornullif implicit typing.
-
Constructor Summary
Constructors Constructor Description ForThisReference(TypeDescription.Generic targetType, Assigner.Typing typing, MemberSubstitution.Source source, boolean optional)Creates an offset mapping that resolves thethisreference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolvedresolve(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod)Resolves an offset mapping for a given instrumented method.
-
-
-
Field Detail
-
targetType
private final TypeDescription.Generic targetType
The targeted type.
-
typing
@MaybeNull @ValueHandling(REVERSE_NULLABILITY) private final Assigner.Typing typing
The typing to use ornullif implicit typing.
-
source
private final MemberSubstitution.Source source
The source providing the reference.
-
optional
private final boolean optional
trueifnullor a primitive0should be assigned to the parameter if nothisreference is available.
-
-
Constructor Detail
-
ForThisReference
public ForThisReference(TypeDescription.Generic targetType, @MaybeNull Assigner.Typing typing, MemberSubstitution.Source source, boolean optional)
Creates an offset mapping that resolves thethisreference.- Parameters:
targetType- The targeted type.typing- The typing to use ornullif implicit typing.source- The source providing the reference.optional-trueifnullor a primitive0should be assigned to the parameter if nothisreference is available.
-
-
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:
resolvein 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.
-
-