|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAdapterSupport
An object that is able to be adapted to another type.
This can be interpreted as a "dynamic" cast to a type that is not statically declared for the receiver. This pattern allows more freedom in layered / component oriented architectures, as the receiver object is not forced to implement a certain interface at compile time.
A generic implementation of this method could use the IAdapterOutlet
singleton to delegate adapter creation to a registered
IAdapterFactory
.
public <T> T getAdapter(Class<T> clazz) { return AdapterOutlet.get().getAdapter(this, clazz); }
Method Summary | ||
---|---|---|
|
getAdapter(java.lang.Class<T> clazz)
Return an object of type clazz that represents the receiver. |
Method Detail |
---|
<T> T getAdapter(java.lang.Class<T> clazz)
clazz
that represents the receiver.
This method should return null
if adaption is not possible.
T
- clazz
-
clazz
that represents the
receiver.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |