com.google.inject
Interface Provider<T>

Type Parameters:
T - the type of object this provides
All Known Subinterfaces:
ProviderWithDependencies<T>
All Known Implementing Classes:
FactoryProvider

public interface Provider<T>

An object capable of providing instances of type T. Providers are used in numerous ways by Guice:


Method Summary
 T get()
          Provides an instance of T.
 

Method Detail

get

T get()
Provides an instance of T. Must never return null.

Throws:
OutOfScopeException - when an attempt is made to access a scoped object while the scope in question is not currently active
ProvisionException - if an instance cannot be provided. Such exceptions include messages and throwables to describe why provision failed.