Пример #1
0
 @Override
 public T supply(Dependency<? super T> dependency, Injector injector) {
   Object owner = instance;
   if (instanceMethod && owner == null) {
     owner = injector.resolve(dependency(factory.getDeclaringClass()));
   }
   final Object[] args = Argument.resolve(dependency, injector, arguments);
   return returnType.getRawType().cast(Invoke.method(factory, owner, args));
 }
Пример #2
0
 @Override
 public T supply(Dependency<? super T> dependency, Injector injector) {
   return Invoke.constructor(constructor, Argument.resolve(dependency, injector, arguments));
 }