@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public static @interface Advice.OnMethodExit
Indicates that this method should be executed before calling the instrumented method. Any class must declare at most one method with this annotation. The annotated method must be static.
The annotated method can imply to not be invoked when the instrumented method terminates exceptionally by
setting the onThrowable()
property.
Advice
,
Advice.Argument
,
Advice.This
,
Advice.Enter
,
Advice.Return
,
Advice.Thrown
Modifier and Type | Optional Element and Description |
---|---|
boolean |
inline
Determines if the annotated method should be inlined into the instrumented method or invoked from it.
|
boolean |
onThrowable
Indicates that the advice method should also be called when a method terminates exceptionally.
|
Class<? extends Throwable> |
suppress
Indicates that this advice should suppress any
Throwable type being thrown during the advice's execution. |
public abstract boolean inline
true
if the annotated method should be inlined into the instrumented method.public abstract boolean onThrowable
true
when defining advice for a constructor.true
if the advice method should be invoked when a method terminates exceptionally.Copyright © 2014–2016. All rights reserved.