Package com.google.inject.spi
Class DependencyAndSource
- java.lang.Object
-
- com.google.inject.spi.DependencyAndSource
-
@Deprecated public final class DependencyAndSource extends java.lang.Object
Deprecated.The only use of this object is forProvisionListener.ProvisionInvocation.getDependencyChain()
which is also deprecated. This object will also be removed in Guice 4.4.A combination of aDependency
and thesource
where the dependency was bound.- Since:
- 4.0
-
-
Field Summary
Fields Modifier and Type Field Description private Dependency<?>
dependency
Deprecated.private java.lang.Object
source
Deprecated.
-
Constructor Summary
Constructors Constructor Description DependencyAndSource(Dependency<?> dependency, java.lang.Object source)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
getBindingSource()
Deprecated.Returns a string describing where this dependency was bound.Dependency<?>
getDependency()
Deprecated.Returns the Dependency, if one exists.java.lang.String
toString()
Deprecated.
-
-
-
Field Detail
-
dependency
private final Dependency<?> dependency
Deprecated.
-
source
private final java.lang.Object source
Deprecated.
-
-
Constructor Detail
-
DependencyAndSource
public DependencyAndSource(Dependency<?> dependency, java.lang.Object source)
Deprecated.
-
-
Method Detail
-
getDependency
public Dependency<?> getDependency()
Deprecated.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
public java.lang.String getBindingSource()
Deprecated.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
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-