1 22 package org.jboss.test.aop.override; 23 24 import org.jboss.aop.joinpoint.Invocation; 25 26 32 public class CountingAspect 33 { 34 static int interceptions; 35 36 public static int getInterceptions() 37 { 38 return interceptions; 39 } 40 41 public static void reset() 42 { 43 interceptions = 0; 44 } 45 46 public Object test(Invocation invocation) throws Throwable  47 { 48 try 49 { 50 interceptions++; 51 return invocation.invokeNext(); 52 } 53 catch(Exception e) 54 { 55 throw e; 56 } 57 } 58 } 59 | Popular Tags |