| Package | Description |
|---|---|
| com.google.inject |
Google Guice (pronounced "juice") is an ultra-lightweight dependency injection framework.
|
| com.google.inject.binder |
Interfaces which make up
Binder's expression language.
|
| com.google.inject.internal |
Guice (sounds like like "juice")
|
| com.google.inject.spi |
Guice service provider interface
|
| com.google.inject.util |
Helper methods for working with Guice.
|
| Modifier and Type | Method and Description |
|---|---|
Provider |
Binding.getProvider()
Returns the scoped provider guice uses to fulfill requests for this binding.
|
<T> Provider |
Binder.getProvider(Class
Returns the provider used to obtain instances for the given injection type.
|
protected <T> Provider |
AbstractModule.getProvider(Class
|
<T> Provider |
Injector.getProvider(Class
Returns the provider used to obtain instances for the given type.
|
protected <T> Provider |
PrivateModule.getProvider(Class
|
<T> Provider |
Binder.getProvider(Dependency
Returns the provider used to obtain instances for the given injection key.
|
<T> Provider |
Binder.getProvider(Key
Returns the provider used to obtain instances for the given injection key.
|
protected <T> Provider |
AbstractModule.getProvider(Key
|
<T> Provider |
Injector.getProvider(Key
Returns the provider used to obtain instances for the given injection key.
|
protected <T> Provider |
PrivateModule.getProvider(Key
|
<T> Provider |
Scope.scope(Key
Scopes a provider.
|
| Modifier and Type | Method and Description |
|---|---|
<T> Provider |
Scope.scope(Key
Scopes a provider.
|
| Modifier and Type | Method and Description |
|---|---|
ScopedBindingBuilder |
LinkedBindingBuilder.toProvider(Provider
See the EDSL examples at
Binder.
|
| Modifier and Type | Class and Description |
|---|---|
class |
ProviderMethod<T>
A provider that invokes a method and returns its result.
|
| Modifier and Type | Method and Description |
|---|---|
Provider |
BindingImpl.getProvider()
|
<T> Provider |
SingletonScope.scope(Key
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 initialization,
|
| Modifier and Type | Method and Description |
|---|---|
<T> Provider |
SingletonScope.scope(Key
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 initialization,
|
BindingBuilder |
BindingBuilder.toProvider(Provider
|
| Modifier and Type | Method and Description |
|---|---|
Errors |
Errors.subtypeNotProvided(Class
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
ProviderBinding<T extends Provider
A binding to a
Provider that delegates to the binding for the provided type.
|
| Modifier and Type | Interface and 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.
|
| Modifier and Type | Method and Description |
|---|---|
Provider |
ProviderLookup.getDelegate()
Returns the delegate provider, or
null if it has not yet been initialized.
|
Provider |
ProviderLookup.getProvider()
Returns the looked up provider.
|
<T> Provider |
TypeEncounter.getProvider(Class
Returns the provider used to obtain instances for the given injection type.
|
<T> Provider |
TypeEncounter.getProvider(Key
Returns the provider used to obtain instances for the given injection key.
|
Provider |
ProviderInstanceBinding.getProviderInstance()
Deprecated.
Use
ProviderInstanceBinding instead.
|
| Modifier and Type | Method and Description |
|---|---|
void |
ProviderLookup.initializeDelegate(Provider
Sets the actual provider.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> Provider |
Providers.guicify(javax
Returns a Guice-friendly
com.google.inject.Provider for the given JSR-330
javax.inject.Provider.
|
static <T> Provider |
Providers.of(T instance)
Returns a provider which always provides
instance.
|