Package com.google.inject.spi
Class DependencyAndSource
java.lang.Object
com.google.inject.spi.DependencyAndSource
A combination of a
Dependency and the source where the dependency was bound.- Since:
- 4.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a string describing where this dependency was bound.Dependency<?>Returns the Dependency, if one exists.toString()
-
Constructor Details
-
DependencyAndSource
-
-
Method Details
-
getDependency
Returns the Dependency, if one exists. For anything that can be referenced byInjector.getBinding(com.google.inject.Key<T>), a dependency exists. A dependency will not exist (and this will return null) for types initialized withBinder.requestInjection(com.google.inject.TypeLiteral<T>, T)orInjector.injectMembers(Object), nor will it exist for objects injected into Providers bound with LinkedBindingBuilder#toProvider(Provider). -
getBindingSource
Returns a string describing where this dependency was bound. If the binding was just-in-time, there is no valid binding source, so this describes the class in question. -
toString
-