/** Pops the current state & sets the new dependency. */ void popStateAndSetDependency(Dependency<?> newDependency) { popState(); this.dependency = newDependency; }
@Override public T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException { Key<? extends T> localTargetKey = targetKey; context.pushState(localTargetKey, source); try { return targetFactory.get(context, dependency, true); } catch (InternalProvisionException ipe) { throw ipe.addSource(localTargetKey); } finally { context.popState(); } }
@Override protected T doProvision(InternalContext context, Dependency<?> dependency) throws InternalProvisionException { // This is what linked bindings do (see FactoryProxy), and we are pretty similar. context.pushState(targetKey, targetSource); try { return targetFactory.get(context, dependency, true); } catch (InternalProvisionException ipe) { throw ipe.addSource(targetKey); } finally { context.popState(); } }
@Override public T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException { context.pushState(providerKey, source); try { javax.inject.Provider<? extends T> provider = providerFactory.get(context, dependency, true); return circularGet(provider, context, dependency, provisionCallback); } catch (InternalProvisionException ipe) { throw ipe.addSource(providerKey); } finally { context.popState(); } }
@Override public T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException { BindingImpl<? extends Provider<T>> localProviderBinding = providerBinding; if (localProviderBinding == null) { throw new IllegalStateException("not initialized"); } Key<? extends Provider<T>> localProviderKey = providerKey; context.pushState(localProviderKey, localProviderBinding.getSource()); try { Provider<? extends T> provider = localProviderBinding.getInternalFactory().get(context, dependency, true); return circularGet(provider, context, dependency, provisionCallback); } catch (InternalProvisionException ipe) { throw ipe.addSource(localProviderKey); } finally { context.popState(); } }
context.popState(); context.close();
/** Pops the current state & sets the new dependency. */ void popStateAndSetDependency(Dependency<?> newDependency) { popState(); this.dependency = newDependency; }
/** Pops the current state & sets the new dependency. */ void popStateAndSetDependency(Dependency<?> newDependency) { popState(); this.dependency = newDependency; }
@Override protected T doProvision(InternalContext context, Dependency<?> dependency) throws InternalProvisionException { // This is what linked bindings do (see FactoryProxy), and we are pretty similar. context.pushState(targetKey, targetSource); try { return targetFactory.get(context, dependency, true); } catch (InternalProvisionException ipe) { throw ipe.addSource(targetKey); } finally { context.popState(); } }
public T get(Errors errors, InternalContext context, Dependency<?> dependency, boolean linked) throws ErrorsException { context.pushState(targetKey, source); try { return targetFactory.get(errors.withSource(targetKey), context, dependency, true); } finally { context.popState(); } }
@Override public T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException { Key<? extends T> localTargetKey = targetKey; context.pushState(localTargetKey, source); try { return targetFactory.get(context, dependency, true); } catch (InternalProvisionException ipe) { throw ipe.addSource(localTargetKey); } finally { context.popState(); } }
@Override protected T doProvision(InternalContext context, Dependency<?> dependency) throws InternalProvisionException { // This is what linked bindings do (see FactoryProxy), and we are pretty similar. context.pushState(targetKey, targetSource); try { return targetFactory.get(context, dependency, true); } catch (InternalProvisionException ipe) { throw ipe.addSource(targetKey); } finally { context.popState(); } }
@Override public T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException { Key<? extends T> localTargetKey = targetKey; context.pushState(localTargetKey, source); try { return targetFactory.get(context, dependency, true); } catch (InternalProvisionException ipe) { throw ipe.addSource(localTargetKey); } finally { context.popState(); } }
public T get(Errors errors, InternalContext context, Dependency<?> dependency, boolean linked) throws ErrorsException { context.pushState(providerKey, source); try { errors = errors.withSource(providerKey); javax.inject.Provider<? extends T> provider = providerFactory.get(errors, context, dependency, true); return circularGet(provider, errors, context, dependency, provisionCallback); } finally { context.popState(); } }
@Override public T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException { context.pushState(providerKey, source); try { javax.inject.Provider<? extends T> provider = providerFactory.get(context, dependency, true); return circularGet(provider, context, dependency, provisionCallback); } catch (InternalProvisionException ipe) { throw ipe.addSource(providerKey); } finally { context.popState(); } }
@Override public T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException { context.pushState(providerKey, source); try { javax.inject.Provider<? extends T> provider = providerFactory.get(context, dependency, true); return circularGet(provider, context, dependency, provisionCallback); } catch (InternalProvisionException ipe) { throw ipe.addSource(providerKey); } finally { context.popState(); } }
public T get(Errors errors, InternalContext context, Dependency dependency, boolean linked) throws ErrorsException { checkState(providerBinding != null, "not initialized"); context.pushState(providerKey, providerBinding.getSource()); try { errors = errors.withSource(providerKey); Provider<? extends T> provider = providerBinding.getInternalFactory().get( errors, context, dependency, true); return circularGet(provider, errors, context, dependency, provisionCallback); } finally { context.popState(); } }
public T get(Errors errors, InternalContext context, Dependency<?> dependency, boolean linked) throws ErrorsException { context.pushState(targetKey, targetBinding.getSource()); try { return targetBinding.getInternalFactory().get( errors.withSource(targetKey), context, dependency, true); } finally { context.popState(); } } };
@Override public T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException { BindingImpl<? extends Provider<T>> localProviderBinding = providerBinding; if (localProviderBinding == null) { throw new IllegalStateException("not initialized"); } Key<? extends Provider<T>> localProviderKey = providerKey; context.pushState(localProviderKey, localProviderBinding.getSource()); try { Provider<? extends T> provider = localProviderBinding.getInternalFactory().get(context, dependency, true); return circularGet(provider, context, dependency, provisionCallback); } catch (InternalProvisionException ipe) { throw ipe.addSource(localProviderKey); } finally { context.popState(); } }
@Override public T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException { BindingImpl<? extends Provider<T>> localProviderBinding = providerBinding; if (localProviderBinding == null) { throw new IllegalStateException("not initialized"); } Key<? extends Provider<T>> localProviderKey = providerKey; context.pushState(localProviderKey, localProviderBinding.getSource()); try { Provider<? extends T> provider = localProviderBinding.getInternalFactory().get(context, dependency, true); return circularGet(provider, context, dependency, provisionCallback); } catch (InternalProvisionException ipe) { throw ipe.addSource(localProviderKey); } finally { context.popState(); } }