@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(); } }
void injectMembers() { InternalContext context = injector.enterContext(); try { boolean isStageTool = injector.options.stage == Stage.TOOL; for (SingleMemberInjector memberInjector : memberInjectors) { // Run injections if we're not in tool stage (ie, PRODUCTION or DEV), // or if we are in tool stage and the injection point is toolable. if (!isStageTool || memberInjector.getInjectionPoint().isToolable()) { try { memberInjector.inject(context, null); } catch (InternalProvisionException e) { errors.merge(e); } } } } finally { context.close(); } } }
context.close();
context.close();
@Override @SuppressWarnings({"PMD.PreserveStackTrace", "PMD.NullAssignment"}) public Object get() { final InternalContext context = ((InjectorImpl) injector).enterContext(); try { // check if (possibly) child context contains anchor bean definition final boolean hasAnchor = injector.getExistingBinding(Key.get(AnchorBean.class)) != null; final Class<?> abstractType = context.getDependency().getKey().getTypeLiteral().getRawType(); final Class<?> generatedType = DynamicClassGenerator.generate(abstractType, getScopeAnnotation(), hasAnchor ? AnchorBean.class : null); return injector.getInstance(generatedType); } 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 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(); } }
void injectMembers() { InternalContext context = injector.enterContext(); try { boolean isStageTool = injector.options.stage == Stage.TOOL; for (SingleMemberInjector memberInjector : memberInjectors) { // Run injections if we're not in tool stage (ie, PRODUCTION or DEV), // or if we are in tool stage and the injection point is toolable. if (!isStageTool || memberInjector.getInjectionPoint().isToolable()) { try { memberInjector.inject(context, null); } catch (InternalProvisionException e) { errors.merge(e); } } } } finally { context.close(); } } }
void injectMembers() { InternalContext context = injector.enterContext(); try { boolean isStageTool = injector.options.stage == Stage.TOOL; for (SingleMemberInjector memberInjector : memberInjectors) { // Run injections if we're not in tool stage (ie, PRODUCTION or DEV), // or if we are in tool stage and the injection point is toolable. if (!isStageTool || memberInjector.getInjectionPoint().isToolable()) { try { memberInjector.inject(context, null); } catch (InternalProvisionException e) { errors.merge(e); } } } } 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(); } }
context.close();
context.close();
context.close();
context.close();