|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.commons.tracing.TracingProxy
public final class TracingProxy
This class can be used to proxy any object, providing tracing for all interfaces of the object.
Note: Java Dynamic Proxies only work on interfaces.
The object returned by the #getProxy(Object) can be cast to
any interface implemented by the argument or one of its ancestors. It
can't, however, be cast to an implementation class.
| Method Summary | |
|---|---|
static Object |
getProxy(Object obj,
Class tracerClass)
Static factory that wraps an object into a proxy depending on the log level for that object. |
Object |
invoke(Object proxy,
Method method,
Object[] args)
Log the entering, exiting and throwing events of the proxied object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Object getProxy(Object obj,
Class tracerClass)
obj - an object for which a proxy should be created
public Object invoke(Object proxy,
Method method,
Object[] args)
throws Throwable
invoke in interface InvocationHandlerThrowableInvocationHandler.invoke(
java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||