org.limewire.concurrent
Class AbstractLazySingletonProvider<T>
java.lang.Object
org.limewire.concurrent.AbstractLazySingletonProvider<T>
- All Implemented Interfaces:
- com.google.inject.Provider<T>
public abstract class AbstractLazySingletonProvider<T>
- extends Object
- implements com.google.inject.Provider<T>
Provides a reference to an object that is created when first
needed. An abstract class, AbstractLazySingletonProvider includes an
implementation to retrieve an object T. You must
implement createObject() in a subclass.
For more
information see
Lazy initialization.
|
Method Summary |
protected abstract T |
createObject()
Creates the object this reference will use. |
T |
get()
Retrieves the reference, creating it if necessary. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractLazySingletonProvider
public AbstractLazySingletonProvider()
get
public T get()
- Retrieves the reference, creating it if necessary.
- Specified by:
get in interface com.google.inject.Provider<T>
createObject
protected abstract T createObject()
- Creates the object this reference will use.
Copyright © 2009. All Rights Reserved.