1 22 package org.jboss.test.aop.reflection; 23 24 import org.jboss.aop.advice.Interceptor; 25 26 31 public class CallerInterceptor implements Interceptor 32 { 33 public static int intercepted; 34 public String getName() 35 { 36 return "CallerInterceptor"; 37 } 38 39 public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable  40 { 41 System.out.println("CallerInterceptor interception: " + invocation.getClass().getName()); 42 intercepted++; 43 return invocation.invokeNext(); 44 } 45 46 public static void reset() 47 { 48 intercepted = 0; 49 } 50 } 51 | Popular Tags |