moving unit tests from .testsuite -> .aop
This commit is contained in:
parent
57b5bdea20
commit
0ae3bbb0fc
|
|
@ -0,0 +1,26 @@
|
||||||
|
|
||||||
|
package org.springframework.aop.aspectj;
|
||||||
|
|
||||||
|
import org.aopalliance.intercept.MethodInterceptor;
|
||||||
|
import org.aopalliance.intercept.MethodInvocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author robh
|
||||||
|
*/
|
||||||
|
class CallCountingInterceptor implements MethodInterceptor {
|
||||||
|
|
||||||
|
private int count;
|
||||||
|
|
||||||
|
public Object invoke(MethodInvocation methodInvocation) throws Throwable {
|
||||||
|
count++;
|
||||||
|
return methodInvocation.proceed();
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCount() {
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reset() {
|
||||||
|
this.count = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue