Write Before and After Advices
So, we introduce before and after advices as being of the form: public void (@JoinPoint ) Differently from around advices and interceptors, throwing a java.lang.Throwable is not necessary, because these advices do not wrap a joinpoint. Instead of Invocation instances, before/after advices receive instances of org.jboss.aop.joinpoint.JoinpointBean and subinterfaces as parameters. Furthermore, one can notice the presence of the parameter annotation @org.jboss.aop.advice.annotation.JoinPoint. This is necessary because before/after advices can receive values with several semantic roles as parameters. As we will see next, this annotation is used to distinguish this parameter type from the other ones, so we can achieve flexibility on the type, order and presence of advice parameters.