Uses of Interface
com.google.inject.Provider
-
Packages that use Provider Package Description com.google.inject Google Guice (pronounced "juice") is an ultra-lightweight dependency injection framework.com.google.inject.assistedinject Extension for combining factory interfaces with injection; this extension requiresguice-assistedinject.jar
.com.google.inject.binder Interfaces which make upBinder
's expression language.com.google.inject.internal Guice (sounds like "juice")com.google.inject.jndi JNDI integration; this extension requiresguice-jndi.jar
.com.google.inject.servlet Servlet API scopes, bindings and registration; this extension requiresguice-servlet.jar
.com.google.inject.spi Guice service provider interfacecom.google.inject.throwingproviders Extension for injecting objects that may throw at provision time; this extension requiresguice-throwingproviders.jar
.com.google.inject.util Helper methods for working with Guice. -
-
Uses of Provider in com.google.inject
Methods in com.google.inject that return Provider Modifier and Type Method Description protected <T> Provider<T>
AbstractModule. getProvider(Key<T> key)
protected <T> Provider<T>
AbstractModule. getProvider(java.lang.Class<T> type)
<T> Provider<T>
Binder. getProvider(Key<T> key)
Returns the provider used to obtain instances for the given injection key.<T> Provider<T>
Binder. getProvider(Dependency<T> dependency)
Returns the provider used to obtain instances for the given injection key.<T> Provider<T>
Binder. getProvider(java.lang.Class<T> type)
Returns the provider used to obtain instances for the given injection type.Provider<T>
Binding. getProvider()
Returns the scoped provider guice uses to fulfill requests for this binding.<T> Provider<T>
Injector. getProvider(Key<T> key)
Returns the provider used to obtain instances for the given injection key.<T> Provider<T>
Injector. getProvider(java.lang.Class<T> type)
Returns the provider used to obtain instances for the given type.protected <T> Provider<T>
PrivateModule. getProvider(Key<T> key)
protected <T> Provider<T>
PrivateModule. getProvider(java.lang.Class<T> type)
<T> Provider<T>
Scope. scope(Key<T> key, Provider<T> unscoped)
Scopes a provider.Methods in com.google.inject that return types with arguments of type Provider Modifier and Type Method Description (package private) Key<Provider<T>>
Key. providerKey()
Gets the key of this key's provider.(package private) TypeLiteral<Provider<T>>
TypeLiteral. providerType()
Gets the type of this type's provider.Methods in com.google.inject with parameters of type Provider Modifier and Type Method Description <T> Provider<T>
Scope. scope(Key<T> key, Provider<T> unscoped)
Scopes a provider. -
Uses of Provider in com.google.inject.assistedinject
Classes in com.google.inject.assistedinject that implement Provider Modifier and Type Class Description class
FactoryProvider<F>
Deprecated.useFactoryModuleBuilder
instead.(package private) class
FactoryProvider2<F>
The newer implementation of factory provider.private static class
FactoryProvider2.ThreadLocalProvider
Fields in com.google.inject.assistedinject declared as Provider Modifier and Type Field Description private Provider<? extends java.lang.Object>
Parameter. provider
Methods in com.google.inject.assistedinject that return Provider Modifier and Type Method Description static <F> Provider<F>
FactoryProvider. newFactory(TypeLiteral<F> factoryType, TypeLiteral<?> implementationType)
Deprecated.static <F> Provider<F>
FactoryProvider. newFactory(java.lang.Class<F> factoryType, java.lang.Class<?> implementationType)
Deprecated. -
Uses of Provider in com.google.inject.binder
Methods in com.google.inject.binder with parameters of type Provider Modifier and Type Method Description ScopedBindingBuilder
LinkedBindingBuilder. toProvider(Provider<? extends T> provider)
See the EDSL examples atBinder
. -
Uses of Provider in com.google.inject.internal
Classes in com.google.inject.internal that implement Provider Modifier and Type Class Description private static class
InjectorShell.InjectorFactory
private static class
InjectorShell.LoggerFactory
(package private) static class
InternalProviderInstanceBindingImpl.CyclicFactory<T>
An base factory implementation that can be extended to provide a specialized implementation of aProviderWithExtensionVisitor
and also implementsInternalFactory
(package private) static class
InternalProviderInstanceBindingImpl.Factory<T>
A base factory implementation.class
ProviderMethod<T>
A provider that invokes a method and returns its result.private static class
ProviderMethod.FastClassProviderMethod<T>
AProviderMethod
implementation that usesFastClass.invoke(java.lang.String, java.lang.Class[], java.lang.Object, java.lang.Object[])
to invoke the provider method.private static class
ProviderMethod.ReflectionProviderMethod<T>
AProviderMethod
implementation that invokes the method using normal java reflection.(package private) class
ProviderToInternalFactoryAdapter<T>
private static class
RealMapBinder.MultimapBinder.RealMultimapProvider<K,V>
private static class
RealMapBinder.MultimapBinder.RealProviderMultimapProvider<K,V>
(package private) static class
RealMapBinder.ProviderMapEntry<K,V>
A factory for aMap.Entry<K, Provider<V>>
.private static class
RealMapBinder.RealMapBinderProviderWithDependencies<K,V,P>
A base class for ProviderWithDependencies that need equality based on a specific object.private static class
RealMapBinder.RealMapProvider<K,V>
private static class
RealMapBinder.RealMultimapBinderProviderWithDependencies<K,V,P>
A base class for ProviderWithDependencies that need equality based on a specific object.private static class
RealMapBinder.RealProviderMapProvider<K,V>
private static class
RealMultibinder.RealMultibinderCollectionOfProvidersProvider<T>
private static class
RealMultibinder.RealMultibinderProvider<T>
private static class
RealOptionalBinder.JavaOptionalProvider<T>
Provides the binding for java.util.Optional. private static class
RealOptionalBinder.JavaOptionalProviderProvider<T>
Provides the binding for java.util.Optional>. private static class
RealOptionalBinder.RealDirectTypeProvider<T>
Provides the binding for T, conditionally installed by calling setBinding/setDefault.private static class
RealOptionalBinder.RealOptionalBinderProviderWithDependencies<T,P>
A base class for ProviderWithDependencies that need equality based on a specific object.private static class
RealOptionalBinder.RealOptionalKeyProvider<T>
Provides the binding for Optional. private static class
RealOptionalBinder.RealOptionalProviderProvider<T>
Provides the binding for Optional>. Fields in com.google.inject.internal declared as Provider Modifier and Type Field Description private Provider<T>
InternalProviderInstanceBindingImpl.Factory. delegateProvider
private Provider<T>
BindingImpl. provider
(package private) Provider<T>
InjectorImpl.ConvertedConstantBindingImpl. provider
private Provider<? extends T>
InternalFactoryToProviderAdapter. provider
Fields in com.google.inject.internal with type parameters of type Provider Modifier and Type Field Description private com.google.common.collect.ImmutableList<Provider<T>>
RealMultibinder.RealMultibinderCollectionOfProvidersProvider. collectionOfProviders
private Key<java.util.Collection<Provider<T>>>
RealMultibinder.BindingSelection. collectionOfProvidersKey
private java.util.Map.Entry<K,Provider<V>>
RealMapBinder.ProviderMapEntry. entry
private RealMultibinder<java.util.Map.Entry<K,Provider<V>>>
RealMapBinder.BindingSelection. entrySetBinder
private RealMultibinder<java.util.Map.Entry<K,Provider<V>>>
RealMapBinder. entrySetBinder
private java.util.Map<K,Provider<V>>
RealMapBinder.RealProviderMapProvider. mapOfProviders
private java.util.Map<K,java.util.Set<Provider<V>>>
RealMapBinder.MultimapBinder.RealProviderMultimapProvider. multimapOfProviders
private Key<java.util.Map<K,java.util.Collection<Provider<V>>>>
RealMapBinder.BindingSelection. providerCollectionMultimapKey
private Key<java.util.Map<K,Provider<V>>>
RealMapBinder.BindingSelection. providerMapKey
private Key<java.util.Map<K,java.util.Set<Provider<V>>>>
RealMapBinder.BindingSelection. providerSetMultimapKey
private java.util.Optional<Provider<T>>
RealOptionalBinder.JavaOptionalProviderProvider. value
private com.google.common.base.Optional<Provider<T>>
RealOptionalBinder.RealOptionalProviderProvider. value
Methods in com.google.inject.internal that return Provider Modifier and Type Method Description Provider<T>
BindingImpl. getProvider()
<T> Provider<T>
DeferredLookups. getProvider(Key<T> key)
<T> Provider<T>
EncounterImpl. getProvider(Key<T> key)
<T> Provider<T>
EncounterImpl. getProvider(java.lang.Class<T> type)
Provider<T>
InjectorImpl.ConvertedConstantBindingImpl. getProvider()
<T> Provider<T>
InjectorImpl. getProvider(Key<T> key)
<T> Provider<T>
InjectorImpl. getProvider(java.lang.Class<T> type)
<T> Provider<T>
InternalInjectorCreator.ToolStageInjector. getProvider(Key<T> key)
<T> Provider<T>
InternalInjectorCreator.ToolStageInjector. getProvider(java.lang.Class<T> type)
<T> Provider<T>
Lookups. getProvider(Key<T> key)
Provider<? extends T>
ProviderInstanceBindingImpl. getProviderInstance()
(package private) <T> Provider<T>
InjectorImpl. getProviderOrThrow(Dependency<T> dependency, Errors errors)
<T> Provider<T>
SingletonScope. scope(Key<T> key, Provider<T> creator)
Provides singleton scope with the following properties: creates no more than one instance per Key as a creator is used no more than once result is cached and returned quickly on subsequent calls exception in a creator is not treated as instance creation and is not cached creates singletons in parallel whenever possible waits for dependent singletons to be created even across threads and when dependencies are shared as long as no circular dependencies are detected returns circular proxy only when circular dependencies are detected aside from that, blocking synchronization is only used for proxy creation and initializationMethods in com.google.inject.internal that return types with arguments of type Provider Modifier and Type Method Description (package private) static <T> TypeLiteral<java.util.Collection<Provider<T>>>
RealMultibinder. collectionOfProvidersOf(TypeLiteral<T> elementType)
(package private) static <T> InternalFactory<Provider<T>>
InjectorImpl.SyntheticProviderBindingImpl. createInternalFactory(Binding<T> providedBinding)
private <T> BindingImpl<Provider<T>>
InjectorImpl. createSyntheticProviderBinding(Key<Provider<T>> key, Errors errors)
Creates a synthetic binding toProvider<T>
, i.e.protected java.util.Map<K,java.util.Set<Provider<V>>>
RealMapBinder.MultimapBinder.RealProviderMultimapProvider. doProvision(InternalContext context, Dependency<?> dependency)
protected java.util.Map.Entry<K,Provider<V>>
RealMapBinder.ProviderMapEntry. doProvision(InternalContext context, Dependency<?> dependency)
protected java.util.Map<K,Provider<V>>
RealMapBinder.RealProviderMapProvider. doProvision(InternalContext context, Dependency<?> dependency)
protected java.util.Collection<Provider<T>>
RealMultibinder.RealMultibinderCollectionOfProvidersProvider. doProvision(InternalContext context, Dependency<?> dependency)
protected java.util.Optional<Provider<T>>
RealOptionalBinder.JavaOptionalProviderProvider. doProvision(InternalContext context, Dependency<?> dependency)
protected com.google.common.base.Optional<Provider<T>>
RealOptionalBinder.RealOptionalProviderProvider. doProvision(InternalContext context, Dependency<?> dependency)
(package private) static <K,V>
TypeLiteral<java.util.Map.Entry<K,Provider<V>>>RealMapBinder. entryOfJavaxProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map.Entry<K,Provider<V>>>RealMapBinder. entryOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) Key<java.util.Collection<Provider<T>>>
RealMultibinder.BindingSelection. getCollectionOfProvidersKey()
private RealMultibinder<java.util.Map.Entry<K,Provider<V>>>
RealMapBinder.BindingSelection. getEntrySetBinder()
private static <T> Key<Provider<T>>
RealMapBinder. getKeyOfProvider(Key<T> valueKey)
Given a Keywill return a Key > private Key<java.util.Map<K,java.util.Collection<Provider<V>>>>
RealMapBinder.BindingSelection. getProviderCollectionMultimapKey()
private Key<java.util.Map<K,Provider<V>>>
RealMapBinder.BindingSelection. getProviderMapKey()
private Key<java.util.Map<K,java.util.Set<Provider<V>>>>
RealMapBinder.BindingSelection. getProviderSetMultimapKey()
(package private) static <T> TypeLiteral<java.util.Optional<Provider<T>>>
RealOptionalBinder. javaOptionalOfProvider(TypeLiteral<T> type)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,java.util.Collection<Provider<V>>>>RealMapBinder. mapOfCollectionOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,Provider<V>>>RealMapBinder. mapOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <K,V>
TypeLiteral<java.util.Map<K,java.util.Set<Provider<V>>>>RealMapBinder. mapOfSetOfProviderOf(TypeLiteral<K> keyType, TypeLiteral<V> valueType)
(package private) static <T> TypeLiteral<com.google.common.base.Optional<Provider<T>>>
RealOptionalBinder. optionalOfProvider(TypeLiteral<T> type)
(package private) static <T> Key<Provider<T>>
RealOptionalBinder. providerOf(Key<T> key)
Methods in com.google.inject.internal with parameters of type Provider Modifier and Type Method Description <T> Provider<T>
SingletonScope. scope(Key<T> key, Provider<T> creator)
Provides singleton scope with the following properties: creates no more than one instance per Key as a creator is used no more than once result is cached and returned quickly on subsequent calls exception in a creator is not treated as instance creation and is not cached creates singletons in parallel whenever possible waits for dependent singletons to be created even across threads and when dependencies are shared as long as no circular dependencies are detected returns circular proxy only when circular dependencies are detected aside from that, blocking synchronization is only used for proxy creation and initializationBindingBuilder<T>
BindingBuilder. toProvider(Provider<? extends T> provider)
Method parameters in com.google.inject.internal with type arguments of type Provider Modifier and Type Method Description <V> V
InjectorImpl.SyntheticProviderBindingImpl. acceptTargetVisitor(BindingTargetVisitor<? super Provider<T>,V> visitor)
private <T> BindingImpl<Provider<T>>
InjectorImpl. createSyntheticProviderBinding(Key<Provider<T>> key, Errors errors)
Creates a synthetic binding toProvider<T>
, i.e.private static <T> Key<T>
InjectorImpl. getProvidedKey(Key<Provider<T>> key, Errors errors)
private static <K,V>
RealMapBinder<K,V>RealMapBinder. newRealMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Key<java.util.Map<K,V>> mapKey, RealMultibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder)
Constructors in com.google.inject.internal with parameters of type Provider Constructor Description InternalFactoryToProviderAdapter(Provider<? extends T> provider, java.lang.Object source)
Constructor parameters in com.google.inject.internal with type arguments of type Provider Constructor Description BindingSelection(TypeLiteral<K> keyType, TypeLiteral<V> valueType, Key<java.util.Map<K,V>> mapKey, RealMultibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder)
RealMapBinder(Binder binder, TypeLiteral<K> keyType, TypeLiteral<V> valueType, Key<java.util.Map<K,V>> mapKey, RealMultibinder<java.util.Map.Entry<K,Provider<V>>> entrySetBinder)
SyntheticProviderBindingImpl(InjectorImpl injector, Key<Provider<T>> key, Binding<T> providedBinding)
-
Uses of Provider in com.google.inject.jndi
Classes in com.google.inject.jndi that implement Provider Modifier and Type Class Description (package private) static class
JndiIntegration.JndiProvider<T>
Methods in com.google.inject.jndi that return Provider Modifier and Type Method Description static <T> Provider<T>
JndiIntegration. fromJndi(java.lang.Class<T> type, java.lang.String name)
Creates a provider which looks up objects in JNDI using the given name. -
Uses of Provider in com.google.inject.servlet
Classes in com.google.inject.servlet that implement Provider Modifier and Type Class Description (package private) class
FilterDefinition
An internal representation of a filter definition against a particular URI pattern.(package private) static class
InternalServletModule.BackwardsCompatibleServletContextProvider
Special Provider that tries to obtain an injected servlet context, specific to the current injector, failing which, it falls back to the static singleton instance that is available in the legacy Guice Servlet.(package private) class
ServletDefinition
An internal representation of a servlet definition mapped to a particular URI pattern.Fields in com.google.inject.servlet declared as Provider Modifier and Type Field Description private Provider<javax.servlet.ServletContext>
ManagedFilterPipeline. servletContext
Methods in com.google.inject.servlet that return Provider Modifier and Type Method Description <T> Provider<T>
ServletScopes.RequestScope. scope(Key<T> key, Provider<T> creator)
<T> Provider<T>
ServletScopes.SessionScope. scope(Key<T> key, Provider<T> creator)
Methods in com.google.inject.servlet with parameters of type Provider Modifier and Type Method Description <T> Provider<T>
ServletScopes.RequestScope. scope(Key<T> key, Provider<T> creator)
<T> Provider<T>
ServletScopes.SessionScope. scope(Key<T> key, Provider<T> creator)
Constructors in com.google.inject.servlet with parameters of type Provider Constructor Description ManagedFilterPipeline(Injector injector, ManagedServletPipeline servletPipeline, Provider<javax.servlet.ServletContext> servletContext)
-
Uses of Provider in com.google.inject.spi
Classes in com.google.inject.spi with type parameters of type Provider Modifier and Type Interface Description interface
ProviderBinding<T extends Provider<?>>
A binding to aProvider
that delegates to the binding for the provided type.Subinterfaces of Provider in com.google.inject.spi Modifier and Type Interface Description interface
ProviderWithDependencies<T>
A provider with dependencies on other injected types.interface
ProviderWithExtensionVisitor<T>
A Provider that is part of an extension which supports a custom BindingTargetVisitor.Fields in com.google.inject.spi declared as Provider Modifier and Type Field Description private Provider<T>
ProviderLookup. delegate
Methods in com.google.inject.spi that return Provider Modifier and Type Method Description Provider<T>
ProviderLookup. getDelegate()
Returns the delegate provider, ornull
if it has not yet been initialized.<T> Provider<T>
Elements.RecordingBinder. getProvider(Key<T> key)
<T> Provider<T>
Elements.RecordingBinder. getProvider(Dependency<T> dependency)
<T> Provider<T>
Elements.RecordingBinder. getProvider(java.lang.Class<T> type)
Provider<T>
ProviderLookup. getProvider()
Returns the looked up provider.<T> Provider<T>
TypeEncounter. getProvider(Key<T> key)
Returns the provider used to obtain instances for the given injection key.<T> Provider<T>
TypeEncounter. getProvider(java.lang.Class<T> type)
Returns the provider used to obtain instances for the given injection type.Provider<? extends T>
ProviderInstanceBinding. getProviderInstance()
Deprecated.UseProviderInstanceBinding.getUserSuppliedProvider()
instead.Methods in com.google.inject.spi with parameters of type Provider Modifier and Type Method Description void
ProviderLookup. initializeDelegate(Provider<T> delegate)
Sets the actual provider. -
Uses of Provider in com.google.inject.throwingproviders
Classes in com.google.inject.throwingproviders that implement Provider Modifier and Type Class Description private static class
CheckedProviderMethodsModule.LogProvider
A provider that returns a logger based on the method name.Fields in com.google.inject.throwingproviders with type parameters of type Provider Modifier and Type Field Description private java.util.List<Provider<?>>
CheckedProviderMethod. parameterProviders
Methods in com.google.inject.throwingproviders with parameters of type Provider Modifier and Type Method Description private ProviderWithDependencies<ThrowingProviderBinder.Result>
ThrowingProviderBinder.SecondaryBinder. createResultProvider(Key<? extends CheckedProvider<?>> targetKey, Provider<? extends CheckedProvider<?>> targetProvider)
Constructor parameters in com.google.inject.throwingproviders with type arguments of type Provider Constructor Description CheckedProviderMethod(Key<T> key, java.lang.reflect.Method method, java.lang.Object instance, com.google.common.collect.ImmutableSet<Dependency<?>> dependencies, java.util.List<Provider<?>> parameterProviders, java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation, java.lang.Class<? extends CheckedProvider> checkedProvider, java.util.List<TypeLiteral<?>> exceptionTypes, boolean scopeExceptions)
-
Uses of Provider in com.google.inject.util
Classes in com.google.inject.util that implement Provider Modifier and Type Class Description private static class
Providers.ConstantProvider<T>
private static class
Providers.GuicifiedProvider<T>
private static class
Providers.GuicifiedProviderWithDependencies<T>
Methods in com.google.inject.util that return Provider Modifier and Type Method Description static <T> Provider<T>
Providers. guicify(javax.inject.Provider<T> provider)
Returns a Guice-friendlycom.google.inject.Provider
for the given JSR-330javax.inject.Provider
.static <T> Provider<T>
Providers. of(T instance)
Returns a provider which always providesinstance
.
-