|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
ProxyFactory.Proxy | All proxies created by a proxy factory will be tagged
with this adapter interface, allowing for later retrieval of
the actual proxy factory that
created the proxy as well as the unique handler associated with it. |
Reference<T> | A reference is used to handle the number of references to a given shared object: as long as only non-mutable methods are invoked on the referenced object, the object can be shared among several proxies. |
Class Summary | |
---|---|
ProxyFactory | A proxy factory creates dynamic proxies, which can also be used for duck typing. |
ProxyFactory.Key | A key adapts a proxy to ensure consistent hashCode()
and equals(Object) behaviour when proxies are stored
internally by proxy factories, because proxies
may override hashCode and equals(Object)
in unpredictable ways. |
ReferenceHandler<T> | A reference handler is the standard implementation of
the Reference interface. |
ReferenceInvocationHandler | A reference invocation handler is an invocation handler that has
support for referenced objects. |
Utilities to create dynamic proxies.
The ProxyFactory
class
is used to create dynamic proxies based on
java.lang.reflect.Proxy
instances.
The factory supplies various methods to construct proxies, but
is also open for sub-classing for further specialisation and
creation of proxies.
The Reference
interface
is used to handle the number of references to a given shared object:
as long as only non-mutable methods are invoked on the
referenced object, the object can be shared among several proxies.
Once a given mutator method is invoked, the referenced object
will be copied using a specified copy method. The
ReferenceInvocationHandler
class is used by proxies representing shared objects, and the
ReferenceHandler
is the
standard implementation of Reference
, though others can
naturally be implemented as well.
|
Gunni Rode / rode.dk | ||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |