Package com.google.inject.internal
Class RealMultibinder.RealMultibinderCollectionOfProvidersProvider<T>
- java.lang.Object
-
- com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory<java.util.Collection<Provider<T>>>
-
- com.google.inject.internal.RealMultibinder.RealMultibinderCollectionOfProvidersProvider<T>
-
- All Implemented Interfaces:
InternalFactory<java.util.Collection<Provider<T>>>
,Provider<java.util.Collection<Provider<T>>>
,HasDependencies
,javax.inject.Provider<java.util.Collection<Provider<T>>>
- Enclosing class:
- RealMultibinder<T>
private static final class RealMultibinder.RealMultibinderCollectionOfProvidersProvider<T> extends InternalProviderInstanceBindingImpl.Factory<java.util.Collection<Provider<T>>>
-
-
Field Summary
Fields Modifier and Type Field Description private RealMultibinder.BindingSelection<T>
bindingSelection
private com.google.common.collect.ImmutableList<Provider<T>>
collectionOfProviders
-
Fields inherited from class com.google.inject.internal.InternalProviderInstanceBindingImpl.Factory
provisionCallback
-
-
Constructor Summary
Constructors Constructor Description RealMultibinderCollectionOfProvidersProvider(RealMultibinder.BindingSelection<T> bindingSelection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Collection<Provider<T>>
doProvision(InternalContext context, Dependency<?> dependency)
Creates an object to be injected.boolean
equals(java.lang.Object obj)
java.util.Set<Dependency<?>>
getDependencies()
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
get, get, getSource
-
-
-
-
Field Detail
-
bindingSelection
private final RealMultibinder.BindingSelection<T> bindingSelection
-
-
Constructor Detail
-
RealMultibinderCollectionOfProvidersProvider
RealMultibinderCollectionOfProvidersProvider(RealMultibinder.BindingSelection<T> bindingSelection)
-
-
Method Detail
-
initialize
void initialize(InjectorImpl injector, Errors errors) throws ErrorsException
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<java.util.Collection<Provider<T>>>
- Throws:
ErrorsException
-
doProvision
protected java.util.Collection<Provider<T>> doProvision(InternalContext context, Dependency<?> dependency)
Description copied from class:InternalProviderInstanceBindingImpl.Factory
Creates an object to be injected.- Specified by:
doProvision
in classInternalProviderInstanceBindingImpl.Factory<java.util.Collection<Provider<T>>>
- Returns:
- instance to be injected
-
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
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-