Package com.google.inject.internal
Class RealMultibinder.BaseFactory<ValueT,ProvidedT>
java.lang.Object
com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory<ProvidedT>
com.google.inject.internal.RealMultibinder.BaseFactory<ValueT,ProvidedT>
- All Implemented Interfaces:
InternalFactory<ProvidedT>
,Provider<ProvidedT>
,HasDependencies
,javax.inject.Provider<ProvidedT>
- Direct Known Subclasses:
RealMultibinder.ExtensionRealMultibinderProvider
,RealMultibinder.RealMultibinderCollectionOfProvidersProvider
,RealMultibinder.RealMultibinderProvider
- Enclosing class:
- RealMultibinder<T>
private abstract static class RealMultibinder.BaseFactory<ValueT,ProvidedT>
extends InternalProviderInstanceBindingImpl.Factory<ProvidedT>
Base implement of
InternalProviderInstanceBindingImpl.Factory
that works based on a
RealMultibinder.BindingSelection
, allowing provider instances for various bindings to be implemented
with less duplication.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final RealMultibinder.BindingSelection<ValueT>
(package private) final Function<RealMultibinder.BindingSelection<ValueT>,
com.google.common.collect.ImmutableSet<Dependency<?>>> Fields inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
provisionCallback
-
Constructor Summary
ConstructorsConstructorDescriptionBaseFactory
(RealMultibinder.BindingSelection<ValueT> bindingSelection, Function<RealMultibinder.BindingSelection<ValueT>, com.google.common.collect.ImmutableSet<Dependency<?>>> dependenciesFn) -
Method Summary
Modifier and TypeMethodDescription(package private) abstract void
boolean
Set<Dependency<?>>
Returns the known dependencies for this type.int
hashCode()
(package private) void
initialize
(InjectorImpl injector, Errors errors) A callback that allows for implementations to fetch dependencies on other bindings.Methods inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
doProvision, get, get, getSource
-
Field Details
-
dependenciesFn
final Function<RealMultibinder.BindingSelection<ValueT>,com.google.common.collect.ImmutableSet<Dependency<?>>> dependenciesFn -
bindingSelection
-
-
Constructor Details
-
BaseFactory
BaseFactory(RealMultibinder.BindingSelection<ValueT> bindingSelection, Function<RealMultibinder.BindingSelection<ValueT>, com.google.common.collect.ImmutableSet<Dependency<?>>> dependenciesFn)
-
-
Method Details
-
initialize
Description copied from class:InternalProviderInstanceBindingImpl.Factory
A callback that allows for implementations to fetch dependencies on other bindings.Will be called exactly once, prior to any call to
InternalProviderInstanceBindingImpl.Factory.doProvision(com.google.inject.internal.InternalContext, com.google.inject.spi.Dependency<?>)
.- Specified by:
initialize
in classInternalProviderInstanceBindingImpl.Factory<ProvidedT>
- Throws:
ErrorsException
-
doInitialize
abstract void doInitialize() -
getDependencies
Description copied from interface:HasDependencies
Returns the known dependencies for this type. If this has dependencies whose values are not known statically, a dependency for theInjector
will be included in the returned set.- Returns:
- a possibly empty set
-
equals
-
hashCode
public int hashCode()
-