@Documented @Retention(value=RUNTIME) @Target(value=PARAMETER) public static @interface Advice.StubValue
Indicates that the annotated parameter should always return a default a boxed version of the instrumented methods return value
(i.e. 0
for numeric values, false
for boolean
types and null
for reference types). The annotated
parameter must be of type Object
and cannot be assigned a value.
Important: Don't confuse this annotation with StubValue
annotation. This annotation should be used only in combination with Advice
ASM visitor. For method
delegation (MethodDelegation.to(...)
) use alternative
annotation from net.bytebuddy.implementation.bind
package.
Advice
,
Advice.OnMethodEnter
,
Advice.OnMethodExit
Copyright © 2014–2022. All rights reserved.