@Override protected T provision( Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { return super.provision(provider, dependency, constructionContext); } catch (RuntimeException userException) { throw InternalProvisionException.errorInProvider(userException); } }
@Override protected T provision( javax.inject.Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { return super.provision(provider, dependency, constructionContext); } catch (RuntimeException userException) { throw InternalProvisionException.errorInProvider(userException).addSource(source); } }
@Override public T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException { try { T t = provider.get(); if (t == null && !dependency.isNullable()) { InternalProvisionException.onNullInjectedIntoNonNullableDependency(source, dependency); } return t; } catch (RuntimeException userException) { throw InternalProvisionException.errorInProvider(userException).addSource(source); } }
@Override protected T provision( javax.inject.Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { Object o = super.provision(provider, dependency, constructionContext); if (o != null && !rawType.isInstance(o)) { throw InternalProvisionException.subtypeNotProvided(providerType, rawType); } @SuppressWarnings("unchecked") // protected by isInstance() check above T t = (T) o; return t; } catch (RuntimeException e) { throw InternalProvisionException.errorInProvider(e).addSource(source); } } }
@Override protected T doProvision(InternalContext context, Dependency<?> dependency) throws InternalProvisionException { try { T t = doProvision(SingleParameterInjector.getAll(context, parameterInjectors)); if (t == null && !dependency.isNullable()) { InternalProvisionException.onNullInjectedIntoNonNullableDependency(getMethod(), dependency); } return t; } catch (IllegalAccessException e) { throw new AssertionError(e); } catch (InvocationTargetException userException) { Throwable cause = userException.getCause() != null ? userException.getCause() : userException; throw InternalProvisionException.errorInProvider(cause).addSource(getSource()); } }
private T provision( Dependency<?> dependency, InternalContext context, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { T t = doProvision(context, dependency); constructionContext.setProxyDelegates(t); return t; } catch (InternalProvisionException ipe) { throw ipe.addSource(getSource()); } catch (Throwable t) { throw InternalProvisionException.errorInProvider(t).addSource(getSource()); } } }
@Override protected T provision( Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { return super.provision(provider, dependency, constructionContext); } catch (RuntimeException userException) { throw InternalProvisionException.errorInProvider(userException); } }
@Override protected T provision( Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { return super.provision(provider, dependency, constructionContext); } catch (RuntimeException userException) { throw InternalProvisionException.errorInProvider(userException); } }
@Override protected T provision( javax.inject.Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { return super.provision(provider, dependency, constructionContext); } catch (RuntimeException userException) { throw InternalProvisionException.errorInProvider(userException).addSource(source); } }
@Override protected T provision( javax.inject.Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { return super.provision(provider, dependency, constructionContext); } catch (RuntimeException userException) { throw InternalProvisionException.errorInProvider(userException).addSource(source); } }
@Override public T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException { try { T t = provider.get(); if (t == null && !dependency.isNullable()) { InternalProvisionException.onNullInjectedIntoNonNullableDependency(source, dependency); } return t; } catch (RuntimeException userException) { throw InternalProvisionException.errorInProvider(userException).addSource(source); } }
@Override public T get(InternalContext context, Dependency<?> dependency, boolean linked) throws InternalProvisionException { try { T t = provider.get(); if (t == null && !dependency.isNullable()) { InternalProvisionException.onNullInjectedIntoNonNullableDependency(source, dependency); } return t; } catch (RuntimeException userException) { throw InternalProvisionException.errorInProvider(userException).addSource(source); } }
@Override protected T provision( javax.inject.Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { Object o = super.provision(provider, dependency, constructionContext); if (o != null && !rawType.isInstance(o)) { throw InternalProvisionException.subtypeNotProvided(providerType, rawType); } @SuppressWarnings("unchecked") // protected by isInstance() check above T t = (T) o; return t; } catch (RuntimeException e) { throw InternalProvisionException.errorInProvider(e).addSource(source); } } }
@Override protected T provision( javax.inject.Provider<? extends T> provider, Dependency<?> dependency, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { Object o = super.provision(provider, dependency, constructionContext); if (o != null && !rawType.isInstance(o)) { throw InternalProvisionException.subtypeNotProvided(providerType, rawType); } @SuppressWarnings("unchecked") // protected by isInstance() check above T t = (T) o; return t; } catch (RuntimeException e) { throw InternalProvisionException.errorInProvider(e).addSource(source); } } }
@Override protected T doProvision(InternalContext context, Dependency<?> dependency) throws InternalProvisionException { try { T t = doProvision(SingleParameterInjector.getAll(context, parameterInjectors)); if (t == null && !dependency.isNullable()) { InternalProvisionException.onNullInjectedIntoNonNullableDependency(getMethod(), dependency); } return t; } catch (IllegalAccessException e) { throw new AssertionError(e); } catch (InvocationTargetException userException) { Throwable cause = userException.getCause() != null ? userException.getCause() : userException; throw InternalProvisionException.errorInProvider(cause).addSource(getSource()); } }
@Override protected T doProvision(InternalContext context, Dependency<?> dependency) throws InternalProvisionException { try { T t = doProvision(SingleParameterInjector.getAll(context, parameterInjectors)); if (t == null && !dependency.isNullable()) { InternalProvisionException.onNullInjectedIntoNonNullableDependency(getMethod(), dependency); } return t; } catch (IllegalAccessException e) { throw new AssertionError(e); } catch (InvocationTargetException userException) { Throwable cause = userException.getCause() != null ? userException.getCause() : userException; throw InternalProvisionException.errorInProvider(cause).addSource(getSource()); } }
private T provision( Dependency<?> dependency, InternalContext context, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { T t = doProvision(context, dependency); constructionContext.setProxyDelegates(t); return t; } catch (InternalProvisionException ipe) { throw ipe.addSource(getSource()); } catch (Throwable t) { throw InternalProvisionException.errorInProvider(t).addSource(getSource()); } } }
private T provision( Dependency<?> dependency, InternalContext context, ConstructionContext<T> constructionContext) throws InternalProvisionException { try { T t = doProvision(context, dependency); constructionContext.setProxyDelegates(t); return t; } catch (InternalProvisionException ipe) { throw ipe.addSource(getSource()); } catch (Throwable t) { throw InternalProvisionException.errorInProvider(t).addSource(getSource()); } } }