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