@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(); } }
context.getDependency(), "internalContext.getDependency()"); Class<?> rawType = dependency.getKey().getTypeLiteral().getRawType();
public T call(InternalContext context) throws ErrorsException { Dependency dependency = context.getDependency(); // 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. return internalFactory.get(errors, context, dependency, true); } });
public T call(InternalContext context) throws ErrorsException { Dependency dependency = context.getDependency(); // 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. return internalFactory.get(errors, context, dependency, true); } });
public T call(InternalContext context) throws ErrorsException { Dependency dependency = context.getDependency(); // 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. return internalFactory.get(errors, context, dependency, true); } });
public T call(InternalContext context) throws ErrorsException { Dependency dependency = context.getDependency(); // 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. return internalFactory.get(errors, context, dependency, true); } });
@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(); } }
internalContext.getDependency(), "globalInternalContext.get(currentThread()).getDependency()"); Class<?> rawType = dependency.getKey().getTypeLiteral().getRawType();
context.getDependency(), "internalContext.getDependency()"); Class<?> rawType = dependency.getKey().getTypeLiteral().getRawType();
context.getDependency(), "internalContext.getDependency()"); Class<?> rawType = dependency.getKey().getTypeLiteral().getRawType();