Use Annotations in Pointcut Expressions
Annotations in pointcut expressions Annotations can be referenced by an '@' sign in pointcut expressions. They can only be used in the class expressions for a method, field, or constructor for execution and caller pointcuts. They can also be used in substitute for 'new' in constructor land, and for a method or field name. Take a look at jboss-aop.xml The first binding above says that for every constructor tagged as @Billable apply the BillingInterceptor. The second binding states that for any method tagged as @Billable apply the BillingInterceptor. Let's now take a look at applying the tracing advice. The above states that for any field, constructor, or method tagged as @Trace, apply the TraceInterceptor.