1 22 package org.jboss.test.aop.jdk15.annotated; 23 24 import org.jboss.aop.Aspect; 25 import org.jboss.aop.Bind; 26 import org.jboss.aop.TypeDef; 27 import org.jboss.aop.pointcut.Typedef; 28 import org.jboss.aop.joinpoint.Invocation; 29 30 31 36 @Aspect (scope=org.jboss.aop.advice.Scope.PER_VM) 37 public class TypedefAspect 38 { 39 public static boolean intercepted; 40 41 @TypeDef ("class(org.jboss.test.aop.jdk15.annotated.VariaPOJO)") 42 public static Typedef myTypedef; 43 44 @Bind (pointcut="execution(* $typedef{org.jboss.test.aop.jdk15.annotated.TypedefAspect.myTypedef}->methodWithTypedef())") 45 public Object typedefAdvice(Invocation invocation) throws Throwable 46 { 47 intercepted = true; 48 return invocation.invokeNext(); 49 } 50 } 51 | Popular Tags |