@Override public void injectMembers(T instance) { TypeLiteral<T> localTypeLiteral = typeLiteral; try { injectAndNotify(instance, null, null, localTypeLiteral, false); } catch (InternalProvisionException ipe) { throw ipe.addSource(localTypeLiteral).toProvisionException(); } }
@Override public T get() { InternalContext context = injector.enterContext(); try { // Always pretend that we are a linked binding, to support // scoping implicit bindings. If we are not actually a linked // binding, we'll fail properly elsewhere in the chain. T t = internalFactory.get(context, context.getDependency(), true); return t; } catch (InternalProvisionException e) { throw e.toProvisionException(); } finally { context.close(); } }
@Override public T get() { InternalContext currentContext = enterContext(); Dependency previous = currentContext.pushDependency(dependency, source); try { T t = internalFactory.get(currentContext, dependency, false); return t; } catch (InternalProvisionException e) { throw e.addSource(dependency).toProvisionException(); } finally { currentContext.popStateAndSetDependency(previous); currentContext.close(); } }
@Override public void injectMembers(T instance) { TypeLiteral<T> localTypeLiteral = typeLiteral; try { injectAndNotify(instance, null, null, localTypeLiteral, false); } catch (InternalProvisionException ipe) { throw ipe.addSource(localTypeLiteral).toProvisionException(); } }
@Override public void injectMembers(T instance) { TypeLiteral<T> localTypeLiteral = typeLiteral; try { injectAndNotify(instance, null, null, localTypeLiteral, false); } catch (InternalProvisionException ipe) { throw ipe.addSource(localTypeLiteral).toProvisionException(); } }
@Override public T get() { InternalContext context = injector.enterContext(); try { // Always pretend that we are a linked binding, to support // scoping implicit bindings. If we are not actually a linked // binding, we'll fail properly elsewhere in the chain. T t = internalFactory.get(context, context.getDependency(), true); return t; } catch (InternalProvisionException e) { throw e.toProvisionException(); } finally { context.close(); } }
@Override public T get() { InternalContext context = injector.enterContext(); try { // Always pretend that we are a linked binding, to support // scoping implicit bindings. If we are not actually a linked // binding, we'll fail properly elsewhere in the chain. T t = internalFactory.get(context, context.getDependency(), true); return t; } catch (InternalProvisionException e) { throw e.toProvisionException(); } finally { context.close(); } }
@Override public T get() { InternalContext currentContext = enterContext(); Dependency previous = currentContext.pushDependency(dependency, source); try { T t = internalFactory.get(currentContext, dependency, false); return t; } catch (InternalProvisionException e) { throw e.addSource(dependency).toProvisionException(); } finally { currentContext.popStateAndSetDependency(previous); currentContext.close(); } }
@Override public T get() { InternalContext currentContext = enterContext(); Dependency previous = currentContext.pushDependency(dependency, source); try { T t = internalFactory.get(currentContext, dependency, false); return t; } catch (InternalProvisionException e) { throw e.addSource(dependency).toProvisionException(); } finally { currentContext.popStateAndSetDependency(previous); currentContext.close(); } }