예제 #1
0
 @Override
 public Logger supply(Dependency<? super Logger> dependency, Injector injector) {
   if (dependency.isUntargeted()) {
     return LoggerFactory.getLogger("General");
   } else {
     return LoggerFactory.getLogger(dependency.target().getType().getRawType());
   }
 }
예제 #2
0
 @Override
 public T supply(Dependency<? super T> dependency, Injector injector) {
   return factory.produce(dependency.getInstance(), dependency.target(1));
 }