Package com.google.inject.spi
Interface ProviderBinding<T extends Provider<?>>
A binding to a
Provider
that delegates to the binding for the provided type. This binding
is used whenever a Provider<T>
is injected (as opposed to injecting T
directly).- Since:
- 2.0
- Author:
- jessewilson@google.com (Jesse Wilson)
-
Method Summary
Modifier and TypeMethodDescriptionKey
<?> Returns the key whose binding is used toprovide instances
.Methods inherited from interface com.google.inject.Binding
acceptScopingVisitor, acceptTargetVisitor, getKey, getProvider
Methods inherited from interface com.google.inject.spi.Element
acceptVisitor, applyTo, getSource
-
Method Details
-
getProvidedKey
Key<?> getProvidedKey()Returns the key whose binding is used toprovide instances
. That binding can be retrieved from an injector usingInjector.getBinding(providedKey)
-