mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 14:09:25 +00:00
moving unit tests from .testsuite -> .aop
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@367 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+26
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user