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 T
get
(InternalContext context, Dependency<?> dependency, boolean linked) Creates an object to be injected.private T
provision
(Dependency<?> dependency, InternalContext context, ConstructionContext<T> constructionContext) Methods inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
doProvision, get, getSource, initialize
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.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:InternalFactory
Creates an object to be injected.- Specified by:
get
in interfaceInternalFactory<T>
- Overrides:
get
in 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
-