Package net.bytebuddy.asm
Annotation Type Advice.AssignReturned.ToThrown
-
@Documented @Retention(RUNTIME) @Target(METHOD) public static @interface Advice.AssignReturned.ToThrownAssigns the advice method's return value as the instrumented method's thrown exception. This annotation can only be used with exit advice marked with
Advice.OnMethodExit. Note that anullvalue on a scalar assignment deactivates this handler and does not, by default, remove a thrown exception. To avoid this, an array assignment must be used orAdvice.AssignReturned.AsScalar.skipOnDefaultValue()must be set tofalse.Important: This annotation has no effect unless an
Advice.AssignReturnedpost processor is explicitly registered.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description intindexThe index in the array that is returned which represents the assigned value.Assigner.TypingtypingThe typing to apply when assigning the returned value to the targeted value.
-
-
-
-
typing
Assigner.Typing typing
The typing to apply when assigning the returned value to the targeted value.- Returns:
- The typing to apply when assigning the returned value to the targeted value.
- Default:
- net.bytebuddy.implementation.bytecode.assign.Assigner.Typing.STATIC
-
-