class MethodInvokingTaskletAdapter extends AbstractMethodInvokingDelegator<Object> implements Tasklet {

	/**
	 * Delegate execution to the target object and translate the return value to an
	 * {@link ExitStatus} by invoking a method in the delegate POJO. Ignores the
	 * {@link StepContribution} and the attributes.
	 *
	 * @see Tasklet#execute(StepContribution, ChunkContext)
	 */
	@Nullable
	@Override
	public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
		if (getArguments() == null) {
			setArguments(new Object[] { contribution, chunkContext });
		}
		contribution.setExitStatus(mapResult(invokeDelegateMethod()));
		return RepeatStatus.FINISHED;
	}

	/**
	 * If the result is an {@link ExitStatus} already just return that, otherwise return
	 * {@link ExitStatus#COMPLETED}.
	 * @param result the value returned by the delegate method
	 * @return an {@link ExitStatus} consistent with the result
	 */
	protected ExitStatus mapResult(Object result) {<FILL_FUNCTION_BODY>}

}

		if (result instanceof ExitStatus) {
			return (ExitStatus) result;
		}
		return ExitStatus.COMPLETED;
	
<methods>public non-sealed void <init>() ,public void afterPropertiesSet() throws java.lang.Exception,public void setArguments(java.lang.Object[]) ,public void setTargetMethod(java.lang.String) ,public void setTargetObject(java.lang.Object) <variables>private java.lang.Object[] arguments,private java.lang.String targetMethod,private java.lang.Object targetObject