Package net.bytebuddy.asm
Annotation Interface MemberSubstitution.Argument
- Enclosing class:
MemberSubstitution
@Documented
@Retention(RUNTIME)
@Target({PARAMETER,METHOD,CONSTRUCTOR})
public static @interface MemberSubstitution.Argument
Indicates that the annotated parameter should be mapped to the parameter with index value()
.
Important: Don't confuse this annotation with Argument
or
Advice.Argument
. This annotation should be used only in combination with MemberSubstitution.Substitution.Chain.Step.ForDelegation
.
- See Also:
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionint
Determines the index of the parameter that is being assigned. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionboolean
Determines if the parameter should be assignednull
if no argument with the specified index is available.Determines the source that is considered for this annotation which can be either the substituted method, constructor or field, or the instrumented method.The typing that should be applied when assigning the argument.
-
Element Details
-
value
int valueDetermines the index of the parameter that is being assigned.- Returns:
- The index of the parameter that is being assigned.
-
typing
Assigner.Typing typingThe typing that should be applied when assigning the argument.- Returns:
- The typing to apply upon assignment.
- Default:
STATIC
-
source
MemberSubstitution.Source sourceDetermines the source that is considered for this annotation which can be either the substituted method, constructor or field, or the instrumented method.- Returns:
- The source that is considered for this annotation.
- Default:
SUBSTITUTED_ELEMENT
-
optional
boolean optionalDetermines if the parameter should be assignednull
if no argument with the specified index is available.- Returns:
true
if the value assignment is optional.
- Default:
false
-