Annotation Interface OnAfter


@Target(METHOD) @Retention(RUNTIME) public @interface OnAfter
Annotates a method in a @Pointcut class that should be run just after each method (or constructor) execution picked out by the Pointcut, whether the method picked out by the Pointcut returns successfully or throws an Exception. Only one method in a @Pointcut class may be annotated with @OnAfter.

An @OnAfter method is run after the @OnReturn and @OnThrow methods, if either of those are present.

An @OnAfter method can accept parameters annotated with any of the following: @BindReceiver, @BindParameter, @BindParameterArray, @BindMethodName or @BindTraveler. @BindTraveler can only be used if there is a corresponding @OnBefore method that returns a non-void type (the traveler).

An @OnAfter method must return void.