|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.rode.thesis.meta.reflect.proxy.ProxyFactory.Handler
private class ProxyFactory.Handler
A handler is used to decorate all invocation handlers used by proxies created by any proxy factory.
A handler logs access to any method accessed via the
proxy, and ensures correct ProxyFactory.Proxy
functionality.
Field Summary | |
---|---|
private InvocationHandler |
handler
The decorated handler. |
Constructor Summary | |
---|---|
private |
ProxyFactory.Handler(InvocationHandler handler)
Constructor. |
Method Summary | |
---|---|
Object |
invoke(Object proxy,
Method method,
Object[] args)
Logs each method invoked. |
String |
toString()
Return the string representation of this handler. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final InvocationHandler handler
Never null.
Constructor Detail |
---|
private ProxyFactory.Handler(InvocationHandler handler)
handler
- The actual invocation handler; cannot be null.
NullPointerException
- If handler
is null.Method Detail |
---|
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
Throwable
public String toString()
toString
in class Object
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |