Beispiel #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));
 }
Beispiel #2
0
 @Override
 public <P> Logger produce(Instance<? super Logger> produced, Instance<P> injected) {
   return Logger.getLogger(injected.getType().getRawType().getCanonicalName());
 }
Beispiel #3
0
 @Override
 public String toString() {
   return instance.toString();
 }