Top Description Fields Constructors Methods
com.google.inject.internal

pack-priv abstract Class ProviderInternalFactory<T>

extends Object
implements InternalFactory<T>
Class Inheritance
All Implemented Interfaces
com.google.inject.internal.InternalFactory
Known Direct Subclasses
com.google.inject.internal.BoundProviderFactory, com.google.inject.internal.InternalFactoryToInitializableAdapter, com.google.inject.internal.ProvidedByInternalFactory
Static Imports
com.google.common.base.Preconditions.checkNotNull

Base class for InternalFactories that are used by Providers, to handle circular dependencies.
Author
[email protected] (Sam Berlin)

Field Summary

Modifier and TypeField and Description
protected final Object

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected T
circularGet(final Provider<? extends T> provider, InternalContext context, final Dependency<?> dependency, ProvisionListenerStackCallback<T> provisionCallback)

protected T
provision(Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext)

Provisions a new instance.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sourceback to summary
protected final Object source

Constructor Detail

ProviderInternalFactoryback to summary
pack-priv ProviderInternalFactory(Object source)

Method Detail

circularGetback to summary
protected T circularGet(final Provider<? extends T> provider, InternalContext context, final Dependency<?> dependency, ProvisionListenerStackCallback<T> provisionCallback) throws InternalProvisionException
provisionback to summary
protected T provision(Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext) throws InternalProvisionException

Provisions a new instance. Subclasses should override this to catch exceptions and rethrow as ErrorsExceptions.