Package com.google.inject.internal
Class RealMapBinder.MultimapBinder.RealMultimapProvider<K,V>
- java.lang.Object
-
- com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory<P>
-
- com.google.inject.internal.RealMapBinder.RealMultimapBinderProviderWithDependencies<K,V,java.util.Map<K,java.util.Set<V>>>
-
- com.google.inject.internal.RealMapBinder.MultimapBinder.RealMultimapProvider<K,V>
-
- All Implemented Interfaces:
InternalFactory<java.util.Map<K,java.util.Set<V>>>
,Provider<java.util.Map<K,java.util.Set<V>>>
,HasDependencies
,javax.inject.Provider<java.util.Map<K,java.util.Set<V>>>
- Enclosing class:
- RealMapBinder.MultimapBinder<K,V>
private static final class RealMapBinder.MultimapBinder.RealMultimapProvider<K,V> extends RealMapBinder.RealMultimapBinderProviderWithDependencies<K,V,java.util.Map<K,java.util.Set<V>>>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
RealMapBinder.MultimapBinder.RealMultimapProvider.PerKeyData<K,V>
A simple class to hold a key and the associated bindings as an array.
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<Dependency<?>>
dependencies
private RealMapBinder.MultimapBinder.RealMultimapProvider.PerKeyData<K,V>[]
perKeyDatas
-
Fields inherited from class com.google.inject.internal.RealMapBinder.RealMultimapBinderProviderWithDependencies
bindingSelection, mapKey
-
Fields inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
provisionCallback
-
-
Constructor Summary
Constructors Modifier Constructor Description private
RealMultimapProvider(Key<java.util.Map<K,V>> mapKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doInitialize(InjectorImpl injector, Errors errors)
Initialize the factory.protected java.util.Map<K,java.util.Set<V>>
doProvision(InternalContext context, Dependency<?> dependency)
Creates an object to be injected.java.util.Set<Dependency<?>>
getDependencies()
Returns the known dependencies for this type.-
Methods inherited from class com.google.inject.internal.RealMapBinder.RealMultimapBinderProviderWithDependencies
equals, hashCode, initialize
-
Methods inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
get, get, getSource
-
-
-
-
Field Detail
-
dependencies
private java.util.Set<Dependency<?>> dependencies
-
perKeyDatas
private RealMapBinder.MultimapBinder.RealMultimapProvider.PerKeyData<K,V>[] perKeyDatas
-
-
Method Detail
-
getDependencies
public java.util.Set<Dependency<?>> 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
-
doInitialize
protected void doInitialize(InjectorImpl injector, Errors errors) throws ErrorsException
Description copied from class:RealMapBinder.RealMultimapBinderProviderWithDependencies
Initialize the factory. BindingSelection is guaranteed to be initialized at this point and this will be called prior to any provisioning.- Specified by:
doInitialize
in classRealMapBinder.RealMultimapBinderProviderWithDependencies<K,V,java.util.Map<K,java.util.Set<V>>>
- Throws:
ErrorsException
-
doProvision
protected java.util.Map<K,java.util.Set<V>> doProvision(InternalContext context, Dependency<?> dependency) throws InternalProvisionException
Description copied from class:InternalProviderInstanceBindingImpl.Factory
Creates an object to be injected.- Specified by:
doProvision
in classInternalProviderInstanceBindingImpl.Factory<java.util.Map<K,java.util.Set<V>>>
- Returns:
- instance to be injected
- Throws:
InternalProvisionException
- if a value cannot be provided
-
-