public abstract class LazyPojo<X> extends SingletonInitializer<X> implements Bean<X>
| Modifier and Type | Class and Description |
|---|---|
protected class |
LazyPojo.NullCheckOnSet |
SingletonProvider.NullCheckOnGetProvidesValue.NoOp<X>ReceivesValue.NoOp<T>proxy| Constructor and Description |
|---|
LazyPojo() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.inject.Provider<X> |
createImmutableProvider(X init)
Return a new proxy provider which just returns the set field.
|
boolean |
isSet()
Tells whether or not this singleton is already set by instanceof checking
the pojo class return from
SingletonProvider.createImmutableProvider(Object). |
protected void |
onDestroyed(X x) |
void |
reset() |
void |
set(X x)
set() can be used either as an asynchronous method callback,
or as an actual setter for a
Bean value. |
onCreateget, initialValueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetprotected void onDestroyed(X x)
public void reset()
public void set(X x)
ReceivesValueBean value.set in interface ReceivesValue<X>x - - The object to receive.protected javax.inject.Provider<X> createImmutableProvider(X init)
SingletonProviderSingletonProvider.NullCheckOnGet,
or you will contract a case of recursion sickness.createImmutableProvider in class SingletonProvider<X>init - - A non-null value to provide immutablyImmutableProvider, THEN YOU MUST OVERRIDE SingletonProvider.isSet() AS WELL.public boolean isSet()
SingletonProviderSingletonProvider.createImmutableProvider(Object).
IF YOU OVERRIDE SingletonProvider.createImmutableProvider(Object), YOU MUST ALSO OVERRIDE isSet().isSet in class SingletonProvider<X>Copyright © December 07, 2012–2015 The Internet Party. All rights reserved.