|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.cglib.Delegator
Delegator
provides a number of static methods that allow
multiple objects to be combined into a single larger object. The
methods in the generated object simply call the original methods in the
underlying "delegate" objects.
Method Summary | |
static java.lang.Object |
create(java.lang.Class[] interfaces,
java.lang.Object[] delegates,
java.lang.ClassLoader loader)
Returns an object that implements all of the specified interfaces. |
static java.lang.Object |
create(java.lang.Object[] delegates,
java.lang.ClassLoader loader)
Returns an object that implements all of the interfaces implemented by the specified objects. |
static java.lang.Object |
createBean(java.lang.Object[] beans,
java.lang.ClassLoader loader)
Combines an array of JavaBeans into a single "super" bean. |
static java.util.Map |
getInterfaceMap(java.lang.Object[] delegates)
Returns a Map that describes how interfaces would be delegated. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.Object create(java.lang.Class[] interfaces, java.lang.Object[] delegates, java.lang.ClassLoader loader)
interfaces
- the array of interfaces to implementdelegates
- The array of delegates. Must be the same length
as the interface array, and each delegates must implements the
corresponding interface.loader
- The ClassLoader to use. If null uses the one that
loaded this class.
public static java.lang.Object create(java.lang.Object[] delegates, java.lang.ClassLoader loader)
Note: interfaces which have no methods (marker interfaces) are not implemented by the returned object.
delegates
- the array of delegatesloader
- The ClassLoader to use. If null uses the one that
loaded this class.
getInterfaceMap(Object[])
public static java.util.Map getInterfaceMap(java.lang.Object[] delegates)
create
methods. For each
interface, the Map value is the objects from the argument array
that would be used as a delegate.
delegates
- the array of delegates
#makeDelegator(Object[])
public static java.lang.Object createBean(java.lang.Object[] beans, java.lang.ClassLoader loader)
beans
- the list of beans to delegate toloader
- The ClassLoader to use. If null uses the one that loaded this class.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |