Package com.google.inject.internal
Class RealMapBinder.RealMapProvider<K,V>
java.lang.Object
com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory<Map<K,V>>
com.google.inject.internal.RealMapBinder.RealMapBinderProviderWithDependencies<K,V,Map<K,V>>
com.google.inject.internal.RealMapBinder.RealMapProvider<K,V>
- All Implemented Interfaces:
InternalFactory<Map<K,,V>> Provider<Map<K,,V>> HasDependencies,javax.inject.Provider<Map<K,V>>
- Enclosing class:
RealMapBinder<K,V>
private static final class RealMapBinder.RealMapProvider<K,V>
extends RealMapBinder.RealMapBinderProviderWithDependencies<K,V,Map<K,V>>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) Set<Dependency<?>> (package private) SingleParameterInjector<V>[]An array of all the injectors.(package private) K[]Fields inherited from class com.google.inject.internal.RealMapBinder.RealMapBinderProviderWithDependencies
bindingSelectionFields inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
provisionCallback -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoInitialize(InjectorImpl injector, Errors errors) Initialize the factory.doProvision(InternalContext context, Dependency<?> dependency) Creates an object to be injected.(package private) RealMapBinder.BindingSelection<K, V> Set<Dependency<?>> Returns the known dependencies for this type.Methods inherited from class com.google.inject.internal.RealMapBinder.RealMapBinderProviderWithDependencies
equals, hashCode, initializeMethods inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
get, get, getSource
-
Field Details
-
dependencies
Set<Dependency<?>> dependencies -
injectors
SingleParameterInjector<V>[] injectorsAn array of all the injectors.This is parallel to array of keys below
-
keys
K[] keys
-
-
Constructor Details
-
RealMapProvider
RealMapProvider(RealMapBinder.BindingSelection<K, V> bindingSelection)
-
-
Method Details
-
getBindingSelection
RealMapBinder.BindingSelection<K,V> getBindingSelection() -
doInitialize
Description copied from class:RealMapBinder.RealMapBinderProviderWithDependenciesInitialize the factory. BindingSelection is guaranteed to be initialized at this point and this will be called prior to any provisioning.- Specified by:
doInitializein classRealMapBinder.RealMapBinderProviderWithDependencies<K,V, Map<K, V>> - Throws:
ErrorsException
-
doProvision
protected Map<K,V> doProvision(InternalContext context, Dependency<?> dependency) throws InternalProvisionException Description copied from class:InternalProviderInstanceBindingImpl.FactoryCreates an object to be injected.- Specified by:
doProvisionin classInternalProviderInstanceBindingImpl.Factory<Map<K,V>> - Returns:
- instance to be injected
- Throws:
InternalProvisionException- if a value cannot be provided
-
getDependencies
Description copied from interface:HasDependenciesReturns the known dependencies for this type. If this has dependencies whose values are not known statically, a dependency for theInjectorwill be included in the returned set.- Returns:
- a possibly empty set
-