@Documented @Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface This
Parameters that are annotated with this annotation will be assigned a reference to the instrumented object, if the instrumented method is not static. Otherwise, the method with this parameter annotation will be excluded from the list of possible binding candidates of the static source method.
Important: Don't confuse this annotation with Advice.This
annotation. This annotation
should be used only in combination with method delegation
(MethodDelegation.to(...)
).
For Advice
ASM visitor use alternative annotation from
net.bytebuddy.asm.Advice
package.
Modifier and Type | Optional Element and Description |
---|---|
boolean |
optional
Determines if the annotated parameter should be bound to
null when intercepting a static method. |
Copyright © 2014–2022. All rights reserved.