Package com.google.inject.internal
Class RealMapBinder.RealMultimapBinderProviderWithDependencies<K,V,P>
java.lang.Object
com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory<P>
com.google.inject.internal.RealMapBinder.RealMultimapBinderProviderWithDependencies<K,V,P>
- All Implemented Interfaces:
InternalFactory<P>,Provider<P>,HasDependencies,javax.inject.Provider<P>
- Direct Known Subclasses:
RealMapBinder.MultimapBinder.RealMultimapProvider,RealMapBinder.MultimapBinder.RealProviderMultimapProvider
- Enclosing class:
RealMapBinder<K,V>
private abstract static class RealMapBinder.RealMultimapBinderProviderWithDependencies<K,V,P>
extends InternalProviderInstanceBindingImpl.Factory<P>
A base class for ProviderWithDependencies that need equality based on a specific object.
This differs from RealMapBinder.RealMapBinderProviderWithDependencies in that it gets the
bindingSelection from the injector at initialization time, rather than in the constructor.
This is done to allow all the providers to operate on the same instance of the RealMapBinder.BindingSelection.
-
Field Summary
FieldsFields inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
provisionCallback -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRealMultimapBinderProviderWithDependencies(Key<Map<K, V>> mapKey) -
Method Summary
Modifier and TypeMethodDescription(package private) abstract voiddoInitialize(InjectorImpl injector, Errors errors) Initialize the factory.booleaninthashCode()(package private) final voidinitialize(InjectorImpl injector, Errors errors) This will get the authoritativeRealMapBinder.BindingSelectionfrom the map provider.Methods inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
doProvision, get, get, getSourceMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.inject.spi.HasDependencies
getDependencies
-
Field Details
-
mapKey
-
bindingSelection
RealMapBinder.BindingSelection<K,V> bindingSelection
-
-
Constructor Details
-
RealMultimapBinderProviderWithDependencies
-
-
Method Details
-
initialize
This will get the authoritativeRealMapBinder.BindingSelectionfrom the map provider. This guarantees that everyone has the same instance of the bindingSelection and sees consistent state.- Specified by:
initializein classInternalProviderInstanceBindingImpl.Factory<P>- Throws:
ErrorsException
-
doInitialize
Initialize the factory. BindingSelection is guaranteed to be initialized at this point and this will be called prior to any provisioning.- Throws:
ErrorsException
-
equals
-
hashCode
public int hashCode()
-