|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.milyn.reflect.MethodInvocationProxyHandler<T>
public class MethodInvocationProxyHandler<T>
Utility class for capturing method invocation statistics.
Useful for testing. Note: Be careful how you use this class. It doesn't filter out recursive/internal method calls i.e. you could eat memory with this class if not careful. Ideally, it should only log external Object invocations.
| Constructor Summary | |
|---|---|
MethodInvocationProxyHandler(T object)
|
|
| Method Summary | |
|---|---|
List<MethodCall> |
getCallList()
Get the complete method call list. |
List<MethodCall> |
getCallList(String methodName)
Get the call list for a specific method. |
Map<String,List<MethodCall>> |
getCallMap()
Get the call map. |
T |
getObject()
|
Object |
invoke(Object proxy,
Method method,
Object[] args)
|
T |
newProxy(Class[] interfaces)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MethodInvocationProxyHandler(T object)
| Method Detail |
|---|
public T getObject()
public T newProxy(Class[] interfaces)
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
invoke in interface InvocationHandlerThrowablepublic List<MethodCall> getCallList()
public List<MethodCall> getCallList(String methodName)
methodName - The method name.
public Map<String,List<MethodCall>> getCallMap()
call list sorted by method name. Overloaded method
calls are bundled together.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||