Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference.Resolved
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference.Resolved
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved
- Enclosing class:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference
@Enhance
protected static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference.Resolved
extends Object
implements MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved
A resolved offset mapping for resolving the
this
reference.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved.ForStackManipulation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Assigner
The assigner to use.private final MethodDescription
The instrumented method.private final boolean
true
ifnull
or a primitive0
should be assigned to the parameter if nothis
reference is available.private final MemberSubstitution.Source
The source providing the reference.private final TypeDescription.Generic
The targeted type.private final Assigner.Typing
The typing to use.. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Resolved
(TypeDescription.Generic targetType, Assigner.Typing typing, MemberSubstitution.Source source, boolean optional, Assigner assigner, MethodDescription instrumentedMethod) Creates a resolved offset mapping for assigning thethis
reference. -
Method Summary
Modifier and TypeMethodDescriptionapply
(TypeDescription receiver, ByteCodeElement.Member original, TypeList.Generic parameters, TypeDescription.Generic result, TypeDescription.Generic current, JavaConstant.MethodHandle methodHandle, Map<Integer, Integer> offsets, int offset) Applies this offset mapping.
-
Field Details
-
targetType
The targeted type. -
typing
The typing to use.. -
source
The source providing the reference. -
optional
private final boolean optionaltrue
ifnull
or a primitive0
should be assigned to the parameter if nothis
reference is available. -
assigner
The assigner to use. -
instrumentedMethod
The instrumented method.
-
-
Constructor Details
-
Resolved
protected Resolved(TypeDescription.Generic targetType, Assigner.Typing typing, MemberSubstitution.Source source, boolean optional, Assigner assigner, MethodDescription instrumentedMethod) Creates a resolved offset mapping for assigning thethis
reference.- Parameters:
targetType
- The targeted type.typing
- The typing to use.source
- The source providing the reference.optional
-true
ifnull
or a primitive0
should be assigned to the parameter if nothis
reference is available.assigner
- The assigner to use.instrumentedMethod
- The instrumented method.
-
-
Method Details
-
apply
public StackManipulation apply(TypeDescription receiver, ByteCodeElement.Member original, TypeList.Generic parameters, TypeDescription.Generic result, TypeDescription.Generic current, JavaConstant.MethodHandle methodHandle, Map<Integer, Integer> offsets, int offset) Applies this offset mapping.- Specified by:
apply
in interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved
- Parameters:
receiver
- The target type of the invoked delegate.original
- The substituted element.parameters
- The parameters that are supplied to the substituted expression.result
- The resulting type of the substituted expression.current
- The type of the value that was produced by the previous step in the substitution chain.methodHandle
- A method handle that represents the substituted element.offsets
- The offsets of the supplied parameters.offset
- The offset of the value that was produced by the previous step.- Returns:
- An appropriate stack manipulation.
-