Package org.springframework.batch.support

# Class SimpleMethodInvoker

java.lang.Object
org.springframework.batch.support.SimpleMethodInvoker

All Implemented Interfaces:
  `MethodInvoker`

public class SimpleMethodInvoker extends Object implements MethodInvoker
Simple implementation of the `MethodInvoker` interface that invokes a method on an object. If the method has no arguments, but arguments are provided, they are ignored and the method is invoked anyway. If there are more arguments than there are provided, then an exception is thrown.

Since:
  2.0
Author:
  Lucas Ward

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SimpleMethodInvoker(Object object, Method method)`
  `SimpleMethodInvoker(Object object, String methodName, Class<?>... paramTypes)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `int`
  `hashCode()`
  `Object`
  `invokeMethod(Object... args)`

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

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

- ## Constructor Details

  - ### SimpleMethodInvoker

    public SimpleMethodInvoker(Object object, Method method)

  - ### SimpleMethodInvoker

    public SimpleMethodInvoker(Object object, String methodName, Class<?>... paramTypes)

- ## Method Details

  - ### invokeMethod

    @Nullable public Object invokeMethod(Object... args)
    Specified by:
      `invokeMethod` in interface `MethodInvoker`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`