public final class DependencyAndSource
extends java.lang.Object
Dependency
and the source
where the dependency was bound.Constructor and Description |
---|
DependencyAndSource(Dependency<?> dependency,
java.lang.Object source) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBindingSource()
Returns a string describing where this dependency was bound.
|
Dependency<?> |
getDependency()
Returns the Dependency, if one exists.
|
java.lang.String |
toString() |
public DependencyAndSource(Dependency<?> dependency, java.lang.Object source)
public Dependency<?> getDependency()
Injector.getBinding(com.google.inject.Key<T>)
, a dependency exists. A dependency will not
exist (and this will return null) for types initialized with
Binder.requestInjection(com.google.inject.TypeLiteral<T>, T)
or Injector.injectMembers(Object)
,
nor will it exist for objects injected into Providers bound with
LinkedBindingBuilder#toProvider(Provider).public java.lang.String getBindingSource()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2006-2018 Google, Inc.. All Rights Reserved.