Class SimpleMethodInvoker
- java.lang.Object
- org.springframework.batch.support.SimpleMethodInvoker
- All Implemented Interfaces:
MethodInvoker
public class SimpleMethodInvoker extends java.lang.Object implements MethodInvoker
Simple implementation of theMethodInvoker
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(java.lang.Object object, java.lang.reflect.Method method)
SimpleMethodInvoker(java.lang.Object object, java.lang.String methodName, java.lang.Class<?>... paramTypes)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.Object
invokeMethod(java.lang.Object... args)
Method Detail
invokeMethod
public java.lang.Object invokeMethod(java.lang.Object... args)
- Specified by:
invokeMethod
in interfaceMethodInvoker
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object