LimeWire Consolidated API

org.limewire.concurrent
Class AbstractLazySingletonProvider<T>

java.lang.Object
  extended by 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.


Constructor Summary
AbstractLazySingletonProvider()
           
 
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
 

Constructor Detail

AbstractLazySingletonProvider

public AbstractLazySingletonProvider()
Method Detail

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.


LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.