Package org.springframework.batch.item.adapter

# Class ItemProcessorAdapter<I,O>

java.lang.Object
org.springframework.batch.item.adapter.AbstractMethodInvokingDelegator<O>
org.springframework.batch.item.adapter.ItemProcessorAdapter<I,O>

All Implemented Interfaces:
  `ItemProcessor<I,O>`, `org.springframework.beans.factory.InitializingBean`

public class ItemProcessorAdapter<I,O> extends AbstractMethodInvokingDelegator<O> implements ItemProcessor<I,O>
Invokes a custom method on a delegate plain old Java object which itself processes an item.

Author:
  Dave Syer

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.springframework.batch.item.adapter.AbstractMethodInvokingDelegator

  `AbstractMethodInvokingDelegator.InvocationTargetThrowableWrapper`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ItemProcessorAdapter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `O`
  `process(I item)`
  Invoke the delegate method and return the result.

  ### Methods inherited from class org.springframework.batch.item.adapter.AbstractMethodInvokingDelegator

  `afterPropertiesSet, getArguments, invokeDelegateMethod, invokeDelegateMethodWithArgument, invokeDelegateMethodWithArguments, setArguments, setTargetMethod, setTargetObject`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ItemProcessorAdapter

    public ItemProcessorAdapter()

- ## Method Details

  - ### process

    @Nullable public O process(I item) throws Exception
    Invoke the delegate method and return the result.
    Specified by:
      `process` in interface `ItemProcessor<I,O>`
    Parameters:
      `item` - to be processed, never `null`.
    Returns:
      potentially modified or new item for continued processing, `null` if processing of the provided item should not continue.
    Throws:
      `Exception` - thrown if exception occurs during processing.
    See Also:
      - `ItemProcessor.process(Object)`