|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--gumbo.util.Delegatables
Constants and utilities related to Delegatable.
| Nested Class Summary | |
static class |
Delegatables.DelegatableImm
A serializable immutable view wrapper for a target Delegatable. |
static class |
Delegatables.DelegatableWrapper
A serializable wrapper for a target Delegatable. |
| Method Summary | |
static java.lang.Object |
delegator(java.lang.Object delegate)
Safely gets the delegator of a delegate. |
static java.lang.Object |
delegator(java.lang.Object delegate,
java.lang.Class type)
Safely gets the delegator of a delegate. |
static java.lang.Object |
delegator(java.lang.Object delegate,
java.util.Collection types)
Safely gets the delegator of a delegate. |
static java.util.Collection |
delegators(java.util.Collection delegates,
java.util.Collection retVal)
Gets the delegators of a collection of delegates. |
static java.util.List |
delegators(java.util.List retVal)
Replaces the delegates in a list with their delegators. |
static java.util.Collection |
excludeDelegators(java.util.Collection delegates,
java.util.Collection types,
java.util.Collection retVal)
Returns only those delegates whose type is NOT assignable to one of the excluded types. |
static java.util.Collection |
includeDelegators(java.util.Collection delegates,
java.util.Collection types,
java.util.Collection retVal)
Returns only those delegates whose type is assignable to one of the included types. |
static java.lang.Object |
rootDelegator(java.lang.Object delegate)
Gets the root delegator of a delegate in a delegation chain by recursively calling getDelegator(). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static java.lang.Object delegator(java.lang.Object delegate)
delegate - A delegate. Returns null if null.
public static java.lang.Object delegator(java.lang.Object delegate,
java.lang.Class type)
delegate - A delegate. Null if none.type - The required assignable type of the delegator.
Null for any.
public static java.lang.Object delegator(java.lang.Object delegate,
java.util.Collection types)
delegate - A delegate. Null if none.types - Allowed assignable types of delegator. Null for any.
public static java.util.Collection delegators(java.util.Collection delegates,
java.util.Collection retVal)
delegates - Collection of delegates (Object). Never null.retVal - Return value object. Collection of delegators
(Object). Never null.
public static java.util.List delegators(java.util.List retVal)
retVal - Input and return value object. Inputs delegates
(Object). Returns delegators (Object). Never null.
public static java.lang.Object rootDelegator(java.lang.Object delegate)
delegate - A delegate. Null if none.
public static java.util.Collection includeDelegators(java.util.Collection delegates,
java.util.Collection types,
java.util.Collection retVal)
delegates - Collection of delegates (Object). Never null.types - Collection of included types (Class). If null,
all types are included.retVal - Return value object. Collection of delegators (Object)
assignable to a type in types. Never null.
public static java.util.Collection excludeDelegators(java.util.Collection delegates,
java.util.Collection types,
java.util.Collection retVal)
delegates - Collection of delegates (Object). Never null.types - Collection of excluded types (Class). If null,
all types are included.retVal - Return value object. Collection of delegators (Object)
not assignable to a type in types. Never null.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||