class CompositeItemProcessListener<T, S> implements ItemProcessListener<T, S> {

	private final OrderedComposite<ItemProcessListener<? super T, ? super S>> listeners = new OrderedComposite<>();

	/**
	 * Public setter for the listeners.
	 * @param itemProcessorListeners list of {@link ItemProcessListener}s to be called
	 * when process events occur.
	 */
	public void setListeners(List<? extends ItemProcessListener<? super T, ? super S>> itemProcessorListeners) {
		this.listeners.setItems(itemProcessorListeners);
	}

	/**
	 * Register additional listener.
	 * @param itemProcessorListener instance of {@link ItemProcessListener} to be
	 * registered.
	 */
	public void register(ItemProcessListener<? super T, ? super S> itemProcessorListener) {
		listeners.add(itemProcessorListener);
	}

	/**
	 * Call the registered listeners in reverse order, respecting and prioritising those
	 * that implement {@link Ordered}.
	 * @see org.springframework.batch.core.ItemProcessListener#afterProcess(java.lang.Object,
	 * java.lang.Object)
	 */
	@Override
	public void afterProcess(T item, @Nullable S result) {<FILL_FUNCTION_BODY>}

	/**
	 * Call the registered listeners in order, respecting and prioritising those that
	 * implement {@link Ordered}.
	 * @see org.springframework.batch.core.ItemProcessListener#beforeProcess(java.lang.Object)
	 */
	@Override
	public void beforeProcess(T item) {
		for (Iterator<ItemProcessListener<? super T, ? super S>> iterator = listeners.iterator(); iterator.hasNext();) {
			ItemProcessListener<? super T, ? super S> listener = iterator.next();
			listener.beforeProcess(item);
		}
	}

	/**
	 * Call the registered listeners in reverse order, respecting and prioritising those
	 * that implement {@link Ordered}.
	 * @see org.springframework.batch.core.ItemProcessListener#onProcessError(java.lang.Object,
	 * java.lang.Exception)
	 */
	@Override
	public void onProcessError(T item, Exception e) {
		for (Iterator<ItemProcessListener<? super T, ? super S>> iterator = listeners.reverse(); iterator.hasNext();) {
			ItemProcessListener<? super T, ? super S> listener = iterator.next();
			listener.onProcessError(item, e);
		}
	}

}

		for (Iterator<ItemProcessListener<? super T, ? super S>> iterator = listeners.reverse(); iterator.hasNext();) {
			ItemProcessListener<? super T, ? super S> listener = iterator.next();
			listener.afterProcess(item, result);
		}
	
<no_super_class>