Package com.google.inject.internal
Class InternalProviderInstanceBindingImpl.CyclicFactory<T>
java.lang.Object
com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory<T>
com.google.inject.internal.InternalProviderInstanceBindingImpl.CyclicFactory<T>
- All Implemented Interfaces:
InternalFactory<T>,Provider<T>,HasDependencies,javax.inject.Provider<T>
- Direct Known Subclasses:
ProviderMethod
- Enclosing class:
- InternalProviderInstanceBindingImpl<T>
abstract static class InternalProviderInstanceBindingImpl.CyclicFactory<T>
extends InternalProviderInstanceBindingImpl.Factory<T>
An base factory implementation that can be extended to provide a specialized implementation of
a
ProviderWithExtensionVisitor and also implements InternalFactory-
Field Summary
Fields inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
provisionCallback -
Constructor Summary
ConstructorsConstructorDescriptionCyclicFactory(InternalProviderInstanceBindingImpl.InitializationTiming initializationTiming) -
Method Summary
Modifier and TypeMethodDescriptionfinal Tget(InternalContext context, Dependency<?> dependency, boolean linked) Creates an object to be injected.private Tprovision(Dependency<?> dependency, InternalContext context, ConstructionContext<T> constructionContext) Methods inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
doProvision, get, getSource, initializeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.inject.spi.HasDependencies
getDependencies
-
Constructor Details
-
CyclicFactory
CyclicFactory(InternalProviderInstanceBindingImpl.InitializationTiming initializationTiming)
-
-
Method Details
-
get
public final T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException Description copied from interface:InternalFactoryCreates an object to be injected.- Specified by:
getin interfaceInternalFactory<T>- Overrides:
getin classInternalProviderInstanceBindingImpl.Factory<T>- Parameters:
context- of this injectionlinked- true if getting as a result of a linked binding- Returns:
- instance that was created
- Throws:
InternalProvisionException- if a value cannot be provided
-
provision
private T provision(Dependency<?> dependency, InternalContext context, ConstructionContext<T> constructionContext) throws InternalProvisionException - Throws:
InternalProvisionException
-