1 22 import org.jboss.aop.joinpoint.Invocation; 23 import org.jboss.aop.joinpoint.FieldInvocation; 24 import org.jboss.aop.advice.Interceptor; 25 26 31 public class FieldInterceptor implements Interceptor 32 { 33 public String getName() { return "FieldInterceptor"; } 34 35 public Object invoke(Invocation invocation) throws Throwable  36 { 37 try 38 { 39 FieldInvocation mi = (FieldInvocation)invocation; 40 System.out.println("<<< Entering FieldInterceptor for: " + mi.getField().getName() + " type: " + mi.getClass().getName()); 41 return invocation.invokeNext(); 42 } 43 finally 44 { 45 System.out.println(">>> Leaving FieldInterceptor"); 46 } 47 } 48 } 49 | Popular Tags |