Exemple #1
0
 @Override
 public T supply(Dependency<? super T> dependency, Injector injector) {
   Type<? super T> type = dependency.getType();
   Instance<? extends T> parametrized =
       instance.typed(
           instance
               .getType()
               .parametized(type.getParameters())
               .lowerBound(dependency.getType().isLowerBound()));
   return injector.resolve(dependency.instanced(parametrized));
 }
Exemple #2
0
 @Override
 public final T supply(Dependency<? super T> dependency, Injector injector) {
   Type<?> elementType = dependency.getType().parameter(0);
   return bridge(supplyArray(dependency.anyTyped(elementType.getArrayType()), injector));
 }