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); } } }