Annotation Type StubValue
-
@Documented @Retention(RUNTIME) @Target(PARAMETER) public @interface StubValueA stub value represents the (boxed) default value of the intercepted method's return type. This value can only be assigned to a
Objectparameter. This annotation is useful to conditionally return a default value from a method when using anObjectreturn type in combination with theRuntimeTypeannotation. The value is either representingnullif a method returns a reference type orvoidor a boxed primitive of the return type representing the numeric value0.Important: Don't confuse this annotation with
Advice.StubValueorMemberSubstitution.StubValue. This annotation should be used withMethodDelegationonly.