Package com.google.inject.internal
Class RealMapBinder.MultimapBinder.RealMultimapProvider<K,V>
java.lang.Object
com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory<Map<K,Set<V>>>
com.google.inject.internal.RealMapBinder.RealMultimapBinderProviderWithDependencies<K,V,Map<K,Set<V>>>
com.google.inject.internal.RealMapBinder.MultimapBinder.RealMultimapProvider<K,V>
- All Implemented Interfaces:
InternalFactory<Map<K,,Set<V>>> Provider<Map<K,,Set<V>>> HasDependencies,javax.inject.Provider<Map<K,Set<V>>>
- Enclosing class:
RealMapBinder.MultimapBinder<K,V>
private static final class RealMapBinder.MultimapBinder.RealMultimapProvider<K,V>
extends RealMapBinder.RealMultimapBinderProviderWithDependencies<K,V,Map<K,Set<V>>>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classA simple class to hold a key and the associated bindings as an array. -
Field Summary
FieldsFields inherited from class com.google.inject.internal.RealMapBinder.RealMultimapBinderProviderWithDependencies
bindingSelection, mapKeyFields 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.Set<Dependency<?>> Returns the known dependencies for this type.Methods inherited from class com.google.inject.internal.RealMapBinder.RealMultimapBinderProviderWithDependencies
equals, hashCode, initializeMethods inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
get, get, getSource
-
Field Details
-
dependencies
-
perKeyDatas
-
-
Constructor Details
-
RealMultimapProvider
-
-
Method Details
-
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
-
doInitialize
Description copied from class:RealMapBinder.RealMultimapBinderProviderWithDependenciesInitialize the factory. BindingSelection is guaranteed to be initialized at this point and this will be called prior to any provisioning.- Specified by:
doInitializein classRealMapBinder.RealMultimapBinderProviderWithDependencies<K,V, Map<K, Set<V>>> - Throws:
ErrorsException
-
doProvision
protected Map<K,Set<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,Set<V>>> - Returns:
- instance to be injected
- Throws:
InternalProvisionException- if a value cannot be provided
-