public class InvocationCounter
extends java.lang.Object
This class is thread safe.
| Modifier and Type | Class and Description |
|---|---|
private class |
InvocationCounter.InvocationHandlerImpl |
| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.concurrent.atomic.AtomicInteger |
exceptionCount |
(package private) java.util.concurrent.atomic.AtomicInteger |
invocationCount |
| Constructor and Description |
|---|
InvocationCounter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
createProxy(java.lang.Object target)
Create a new proxy.
|
int |
getExceptionCount()
Get the number of exceptions counted by this instance.
|
int |
getInvocationCount()
Get the number of invocations counted by this instance.
|
void |
reset()
Reset all counters to zero.
|
final java.util.concurrent.atomic.AtomicInteger invocationCount
final java.util.concurrent.atomic.AtomicInteger exceptionCount
public java.lang.Object createProxy(java.lang.Object target)
target - the target instancepublic int getInvocationCount()
public int getExceptionCount()
public void reset()