/* * JBoss, the OpenSource J2EE webOS * * Distributable under LGPL license. * See terms of license at gnu.org. */ import org.jboss.aop.joinpoint.Invocation; import org.jboss.aop.joinpoint.FieldInvocation; import org.jboss.aop.advice.Interceptor; /** * * @author Bill Burke * @version $Revision: 1.2 $ */ public class FieldInterceptor implements Interceptor { public String getName() { return "FieldInterceptor"; } public Object invoke(Invocation invocation) throws Throwable { try { FieldInvocation mi = (FieldInvocation)invocation; System.out.println("<<< Entering FieldInterceptor for: " + mi.getField().getName() + " type: " + mi.getClass().getName()); return invocation.invokeNext(); } finally { System.out.println(">>> Leaving FieldInterceptor"); } } }