1 22 package org.jboss.test.aop.bean; 23 24 import org.jboss.aop.advice.Interceptor; 25 import org.jboss.aop.joinpoint.Invocation; 26 27 32 public class OverriddenAnnotationInterceptor implements Interceptor 33 { 34 public static boolean intercepted; 35 public static OverriddenAnnotation overriddenAnnotation; 36 37 public String getName() 38 { 39 return this.getClass().getName(); 40 } 41 42 public Object invoke(Invocation invocation) throws Throwable 43 { 44 intercepted = true; 45 overriddenAnnotation = (OverriddenAnnotation)invocation.resolveClassAnnotation(OverriddenAnnotation.class); 46 System.out.println("overridden " + overriddenAnnotation); 47 return invocation.invokeNext(); 48 } 49 50 } 51 | Popular Tags |