|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mrcode.duckprxy.impl.DuckPrxyImpl
public class DuckPrxyImpl
A (more or less) simple implementation of DuckProxy that uses java reflections. How to delegate is mostly determined when a method is called.
Constructor Summary | |
---|---|
DuckPrxyImpl()
|
Method Summary | ||
---|---|---|
|
makeProxy(java.lang.Class<T> mainInterface,
java.lang.Object delegate,
java.lang.Class<?>... interfaces)
Creates an object that implements the defined interfaces delegating to a given object, mainly using duck typing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DuckPrxyImpl()
Method Detail |
---|
public <T> T makeProxy(java.lang.Class<T> mainInterface, java.lang.Object delegate, java.lang.Class<?>... interfaces)
DuckPrxy
makeProxy
in interface DuckPrxy
T
- The class of the main interface.mainInterface
- The main interface that the resulting object
shall implement.delegate
- The object to delegate the calls to.interfaces
- Secondary interfaces to implement.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |