Package com.google.inject.internal
Class ProviderInternalFactory<T>
java.lang.Object
com.google.inject.internal.ProviderInternalFactory<T>
- All Implemented Interfaces:
InternalFactory<T>
- Direct Known Subclasses:
BoundProviderFactory
,InternalFactoryToInitializableAdapter
,ProvidedByInternalFactory
Base class for InternalFactories that are used by Providers, to handle circular dependencies.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected T
circularGet
(javax.inject.Provider<? extends T> provider, InternalContext context, Dependency<?> dependency, ProvisionListenerStackCallback<T> provisionCallback) protected T
provision
(javax.inject.Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext) Provisions a new instance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.inject.internal.InternalFactory
get
-
Field Details
-
source
-
-
Constructor Details
-
ProviderInternalFactory
ProviderInternalFactory(Object source)
-
-
Method Details
-
circularGet
protected T circularGet(javax.inject.Provider<? extends T> provider, InternalContext context, Dependency<?> dependency, @Nullable ProvisionListenerStackCallback<T> provisionCallback) throws InternalProvisionException - Throws:
InternalProvisionException
-
provision
protected T provision(javax.inject.Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext) throws InternalProvisionException Provisions a new instance. Subclasses should override this to catch exceptions & rethrow as ErrorsExceptions.- Throws:
InternalProvisionException
-