Home | History | Annotate | Download | only in spi

Lines Matching defs:Dependency

33  * <p>Use {@link #get} to build a freestanding dependency, or {@link InjectionPoint} to build one
40 public final class Dependency<T> {
46 Dependency(InjectionPoint injectionPoint, Key<T> key, boolean nullable, int parameterIndex) {
54 * Returns a new dependency that is not attached to an injection point. The returned dependency is
57 public static <T> Dependency<T> get(Key<T> key) {
58 return new Dependency<T>(null, MoreTypes.canonicalizeKey(key), true, -1);
64 public static Set<Dependency<?>> forInjectionPoints(Set<InjectionPoint> injectionPoints) {
65 List<Dependency<?>> dependencies = Lists.newArrayList();
73 * Returns the key to the binding that satisfies this dependency.
80 * Returns true if null is a legal value for this dependency.
87 * Returns the injection point to which this dependency belongs, or null if this dependency isn't
95 * Returns the index of this dependency in the injection point's parameter list, or {@code -1} if
96 * this dependency does not belong to a parameter list. Only method and constuctor dependencies
108 if (o instanceof Dependency) {
109 Dependency dependency = (Dependency) o;
110 return Objects.equal(injectionPoint, dependency.injectionPoint)
111 && Objects.equal(parameterIndex, dependency.parameterIndex)
112 && Objects.equal(key, dependency.key);