Package net.bytebuddy.asm
Annotation Interface MemberSubstitution.This
- Enclosing class:
MemberSubstitution
@Documented
@Retention(RUNTIME)
@Target({PARAMETER,METHOD,CONSTRUCTOR})
public static @interface MemberSubstitution.This
Indicates that the annotated parameter should be mapped to the this reference of the substituted field,
method, constructor or of the instrumented method.
Important: Don't confuse this annotation with This or
Advice.This. This annotation should be used only in combination with MemberSubstitution.Substitution.Chain.Step.ForDelegation.
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanDetermines if the parameter should be assignednullif nothisparameter 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 thethisvalue.
-
Element Details
-
typing
Assigner.Typing typingThe typing that should be applied when assigning thethisvalue.- 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 assignednullif nothisparameter is available.- Returns:
trueif the value assignment is optional.
- Default:
false
-