Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForArgument.Resolved
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForArgument.Resolved
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved
@Enhance
protected static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForArgument.Resolved
extends Object
implements MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved
A resolved offset mapping to the parameter of either the instrumented method or
the substituted element.
-
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 AssignerThe assigner to use.private final intThe index of the parameter.private final MethodDescriptionThe instrumented method.private final booleantrueifnullor a primitive0should be assigned to the parameter if the provided index is not available.private final MemberSubstitution.SourceThe source providing the argument.private final TypeDescription.GenericThe targeted type.private final Assigner.TypingThe typing to use when assigning. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedResolved(TypeDescription.Generic targetType, int index, Assigner.Typing typing, MemberSubstitution.Source source, boolean optional, Assigner assigner, MethodDescription instrumentedMethod) Creates a resolved offset mapping for assigning a parameter. -
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. -
index
private final int indexThe index of the parameter. -
typing
The typing to use when assigning. -
source
The source providing the argument. -
optional
private final boolean optionaltrueifnullor a primitive0should be assigned to the parameter if the provided index is not available. -
assigner
The assigner to use. -
instrumentedMethod
The instrumented method.
-
-
Constructor Details
-
Resolved
protected Resolved(TypeDescription.Generic targetType, int index, Assigner.Typing typing, MemberSubstitution.Source source, boolean optional, Assigner assigner, MethodDescription instrumentedMethod) Creates a resolved offset mapping for assigning a parameter.- Parameters:
targetType- The targeted type.index- The index of the parameter.typing- The typing to use when assigning.source- The source providing the argument.optional-trueifnullor a primitive0should be assigned to the parameter if the provided index is not 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:
applyin 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.
-