1 22 package org.jboss.test.aop.deployers.annotations; 23 24 import org.jboss.aop.Bind; 25 import org.jboss.aop.InterceptorDef; 26 import org.jboss.aop.advice.Interceptor; 27 import org.jboss.aop.joinpoint.Invocation; 28 29 34 @InterceptorDef 35 @Bind(pointcut="execution(void org.jboss.test.aop.deployers.annotations.POJO->someMethod())") 36 public class SomeInterceptor implements Interceptor 37 { 38 public static int invoked; 39 public String getName() 40 { 41 return this.getClass().getName(); 42 } 43 44 public Object invoke(Invocation invocation) throws Throwable 45 { 46 invoked++; 47 return invocation.invokeNext(); 48 } 49 50 } 51 | Popular Tags |