|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gumbo.util.AbstractDisposable | +--gumbo.util.AbstractDelegatable
A full implementation of the Delegatable interface. Also implements Disposable, with a default implementation that nulls the delegator reference.
If extended by a serializable subclass, the subclass should throw an exception if it is disposed and serialization is attempted. The state of this object, which must be custom serialized, consists of the delegator (see AbstractDelegatable.Serial).
Nested Class Summary | |
static class |
AbstractDelegatable.Serial
Serializable version of AbstractDelegatable. |
Constructor Summary | |
AbstractDelegatable()
Creates an instance with an uninitialized delegator. |
Method Summary | |
java.lang.Object |
getDelegator()
Gets the delegator of this delegate, as set by initDelegator(). |
protected void |
implDispose()
Nulls the delegator reference. |
Delegatable |
initDelegator(java.lang.Object delegator)
Used by delegators and serialization to initialize this delegate's delegator reference. |
protected void |
initedDelegator()
Called by initDelegator() after the delegator has been successfully initialized. |
protected void |
initingDelegator(java.lang.Object delegator)
Called by initDelegator() to check this delegate's delegator. |
boolean |
isDelegatorInited()
Also returns false if this object is disposed. |
Methods inherited from class gumbo.util.AbstractDisposable |
dispose, isDisposed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractDelegatable()
new AbstractDelegatable().initDelegator(d)
.
Method Detail |
protected void initingDelegator(java.lang.Object delegator)
delegator
- Reference to the delegator. Possibly this delegate
but never null.protected void initedDelegator()
public final Delegatable initDelegator(java.lang.Object delegator)
Delegatable
initDelegator
in interface Delegatable
delegator
- Reference to the delegator. If self-delegation
is allowed and the delegator is null, this object is the delegator
(which facilitates inline construction).
public final boolean isDelegatorInited()
isDelegatorInited
in interface Delegatable
public final java.lang.Object getDelegator()
Delegatable
getDelegator
in interface Delegatable
protected void implDispose()
implDispose
in class AbstractDisposable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |