Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForAllArguments
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForAllArguments
- 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.ForAllArguments
extends Object
implements MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
An offset mapping that assigns an array containing all arguments to the annotated parameter.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enum
A factory for creating an offset mapping containing all supplies arguments.protected static class
A resolves offset mapping for an array containing all arguments.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
FieldsModifier and TypeFieldDescriptionprivate final boolean
true
if thethis
reference should be included in the created array, if available.private final boolean
true
ifnull
should be assigned to the parameter if no arguments are available.private final MemberSubstitution.Source
The source providing the reference.private final TypeDescription.Generic
The component type of the annotated parameter.private final Assigner.Typing
The typing to use ornull
if implicit typing. -
Constructor Summary
ConstructorsConstructorDescriptionForAllArguments
(TypeDescription.Generic targetComponentType, Assigner.Typing typing, MemberSubstitution.Source source, boolean includeSelf, boolean nullIfEmpty) Creates a new offset mapping for an array containing all supplied arguments. -
Method Summary
Modifier and TypeMethodDescriptionresolve
(Assigner assigner, Assigner.Typing typing, TypeDescription instrumentedType, MethodDescription instrumentedMethod) Resolves an offset mapping for a given instrumented method.
-
Field Details
-
targetComponentType
The component type of the annotated parameter. -
typing
The typing to use ornull
if implicit typing. -
source
The source providing the reference. -
includeSelf
private final boolean includeSelftrue
if thethis
reference should be included in the created array, if available. -
nullIfEmpty
private final boolean nullIfEmptytrue
ifnull
should be assigned to the parameter if no arguments are available.
-
-
Constructor Details
-
ForAllArguments
public ForAllArguments(TypeDescription.Generic targetComponentType, @MaybeNull Assigner.Typing typing, MemberSubstitution.Source source, boolean includeSelf, boolean nullIfEmpty) Creates a new offset mapping for an array containing all supplied arguments.- Parameters:
targetComponentType
- The component type of the annotated parameter.typing
- The typing to use ornull
if implicit typing.source
- The source providing the reference.includeSelf
-true
if thethis
reference should be included in the created array, if available.nullIfEmpty
-true
ifnull
should be assigned to the parameter if no arguments are available.
-
-
Method Details
-
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.
-