@Override public T call() throws InternalProvisionException { injectMembers(instance, context, toolableOnly); return instance; } });
/** Provisions a new T. */ private T provision(InternalContext context, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { T t; try { Object[] parameters = SingleParameterInjector.getAll(context, parameterInjectors); t = constructionProxy.newInstance(parameters); constructionContext.setProxyDelegates(t); } finally { constructionContext.finishConstruction(); } // Store reference. If an injector re-enters this factory, they'll get the same reference. constructionContext.setCurrentReference(t); MembersInjectorImpl<T> localMembersInjector = membersInjector; localMembersInjector.injectMembers(t, context, false); localMembersInjector.notifyListeners(t); return t; } catch (InvocationTargetException userException) { Throwable cause = userException.getCause() != null ? userException.getCause() : userException; throw InternalProvisionException.errorInjectingConstructor(cause) .addSource(constructionProxy.getInjectionPoint()); } finally { constructionContext.removeCurrentReference(); } } }
injectMembers(instance, context, toolableOnly);
public Void call(InternalContext context) throws ErrorsException { injectMembers(instance, errors, context, toolableOnly); return null; } });
public Void call(InternalContext context) throws ErrorsException { injectMembers(instance, errors, context, toolableOnly); return null; } });
@Override public T call() throws InternalProvisionException { injectMembers(instance, context, toolableOnly); return instance; } });
@Override public T call() throws InternalProvisionException { injectMembers(instance, context, toolableOnly); return instance; } });
public Void call(InternalContext context) throws ErrorsException { injectMembers(instance, errors, context, toolableOnly); return null; } });
@Override public Void call(final InternalContext context) throws ErrorsException { context.pushState(key, source); try { if (provisionCallback != null && provisionCallback.hasListeners()) { provisionCallback.provision(errors, context, new ProvisionCallback<T>() { @Override public T call() { injectMembers(instance, errors, context, toolableOnly); return instance; } }); } else { injectMembers(instance, errors, context, toolableOnly); } } finally { context.popState(); } return null; } });
/** Provisions a new T. */ private T provision(InternalContext context, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { T t; try { Object[] parameters = SingleParameterInjector.getAll(context, parameterInjectors); t = constructionProxy.newInstance(parameters); constructionContext.setProxyDelegates(t); } finally { constructionContext.finishConstruction(); } // Store reference. If an injector re-enters this factory, they'll get the same reference. constructionContext.setCurrentReference(t); MembersInjectorImpl<T> localMembersInjector = membersInjector; localMembersInjector.injectMembers(t, context, false); localMembersInjector.notifyListeners(t); return t; } catch (InvocationTargetException userException) { Throwable cause = userException.getCause() != null ? userException.getCause() : userException; throw InternalProvisionException.errorInjectingConstructor(cause) .addSource(constructionProxy.getInjectionPoint()); } finally { constructionContext.removeCurrentReference(); } } }
/** Provisions a new T. */ private T provision(InternalContext context, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { T t; try { Object[] parameters = SingleParameterInjector.getAll(context, parameterInjectors); t = constructionProxy.newInstance(parameters); constructionContext.setProxyDelegates(t); } finally { constructionContext.finishConstruction(); } // Store reference. If an injector re-enters this factory, they'll get the same reference. constructionContext.setCurrentReference(t); MembersInjectorImpl<T> localMembersInjector = membersInjector; localMembersInjector.injectMembers(t, context, false); localMembersInjector.notifyListeners(t); return t; } catch (InvocationTargetException userException) { Throwable cause = userException.getCause() != null ? userException.getCause() : userException; throw InternalProvisionException.errorInjectingConstructor(cause) .addSource(constructionProxy.getInjectionPoint()); } finally { constructionContext.removeCurrentReference(); } } }
membersInjector.injectMembers(t, errors, context, false); membersInjector.notifyListeners(t, errors);
injectMembers(instance, context, toolableOnly);
injectMembers(instance, context, toolableOnly);
membersInjector.injectMembers(t, errors, context, false); membersInjector.notifyListeners(t, errors);
membersInjector.injectMembers(t, errors, context, false); membersInjector.notifyListeners(t, errors);
membersInjector.injectMembers(t, errors, context, false); membersInjector.notifyListeners(t, errors);