1 22 package org.jboss.test.aop.extender; 23 24 import java.lang.reflect.Method ; 25 import java.util.ArrayList ; 26 27 import org.jboss.aop.joinpoint.Invocation; 28 import org.jboss.aop.joinpoint.MethodInvocation; 29 30 35 public class SuperCallAspect 36 { 37 public static int interceptions = 0; 38 public static ArrayList methodClasses = new ArrayList (); 39 40 public Object invoke(Invocation invocation) throws Throwable 41 { 42 interceptions++; 43 if (invocation instanceof MethodInvocation) 44 { 45 Method method = ((MethodInvocation)invocation).getActualMethod(); 46 System.out.println("invoking " + method); 47 Class clazz = method.getDeclaringClass(); 48 methodClasses.add(clazz); 49 } 50 return invocation.invokeNext(); 51 } 52 } 53 | Popular Tags |