1 22 package org.jboss.test.aop.regression.inheritedfield; 23 24 import java.lang.reflect.Field ; 25 26 import org.jboss.aop.advice.Interceptor; 27 import org.jboss.aop.joinpoint.FieldInvocation; 28 import org.jboss.aop.joinpoint.Invocation; 29 30 35 public class TestInterceptor implements Interceptor 36 { 37 public static Field intercepted; 38 public String getName() 39 { 40 return "TestInterceptor"; 41 } 42 43 public Object invoke(Invocation invocation) throws Throwable 44 { 45 System.out.println("Intercepting"); 46 if (invocation instanceof FieldInvocation) 47 { 48 FieldInvocation inv = (FieldInvocation)invocation; 49 intercepted = inv.getField(); 50 } 51 52 return invocation.invokeNext(); 53 } 54 55 56 } 57 | Popular Tags |