void notifyListeners(T instance) throws InternalProvisionException { ImmutableList<InjectionListener<? super T>> localInjectionListeners = injectionListeners; if (localInjectionListeners == null) { // no listeners return; } // optimization: use manual for/each to save allocating an iterator here for (int i = 0; i < localInjectionListeners.size(); i++) { InjectionListener<? super T> injectionListener = localInjectionListeners.get(i); try { injectionListener.afterInjection(instance); } catch (RuntimeException e) { throw InternalProvisionException.errorNotifyingInjectionListener( injectionListener, typeLiteral, e); } } }
void notifyListeners(T instance) throws InternalProvisionException { ImmutableList<InjectionListener<? super T>> localInjectionListeners = injectionListeners; if (localInjectionListeners == null) { // no listeners return; } // optimization: use manual for/each to save allocating an iterator here for (int i = 0; i < localInjectionListeners.size(); i++) { InjectionListener<? super T> injectionListener = localInjectionListeners.get(i); try { injectionListener.afterInjection(instance); } catch (RuntimeException e) { throw InternalProvisionException.errorNotifyingInjectionListener( injectionListener, typeLiteral, e); } } }
void notifyListeners(T instance) throws InternalProvisionException { ImmutableList<InjectionListener<? super T>> localInjectionListeners = injectionListeners; if (localInjectionListeners == null) { // no listeners return; } // optimization: use manual for/each to save allocating an iterator here for (int i = 0; i < localInjectionListeners.size(); i++) { InjectionListener<? super T> injectionListener = localInjectionListeners.get(i); try { injectionListener.afterInjection(instance); } catch (RuntimeException e) { throw InternalProvisionException.errorNotifyingInjectionListener( injectionListener, typeLiteral, e); } } }
void notifyListeners(T instance, Errors errors) throws ErrorsException { int numErrorsBefore = errors.size(); for (InjectionListener<? super T> injectionListener : injectionListeners) { try { injectionListener.afterInjection(instance); } catch (RuntimeException e) { errors.errorNotifyingInjectionListener(injectionListener, typeLiteral, e); } } errors.throwIfNewErrors(numErrorsBefore); }
void notifyListeners(T instance, Errors errors) throws ErrorsException { int numErrorsBefore = errors.size(); for (InjectionListener<? super T> injectionListener : injectionListeners) { try { injectionListener.afterInjection(instance); } catch (RuntimeException e) { errors.errorNotifyingInjectionListener(injectionListener, typeLiteral, e); } } errors.throwIfNewErrors(numErrorsBefore); }
void notifyListeners(T instance, Errors errors) throws ErrorsException { int numErrorsBefore = errors.size(); for (InjectionListener<? super T> injectionListener : injectionListeners) { try { injectionListener.afterInjection(instance); } catch (RuntimeException e) { errors.errorNotifyingInjectionListener(injectionListener, typeLiteral, e); } } errors.throwIfNewErrors(numErrorsBefore); }
void notifyListeners(T instance, Errors errors) throws ErrorsException { int numErrorsBefore = errors.size(); for (InjectionListener<? super T> injectionListener : injectionListeners) { try { injectionListener.afterInjection(instance); } catch (RuntimeException e) { errors.errorNotifyingInjectionListener(injectionListener, typeLiteral, e); } } errors.throwIfNewErrors(numErrorsBefore); }