public class SimpleMethodInvoker extends java.lang.Object implements MethodInvoker
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.Constructor and Description |
---|
SimpleMethodInvoker(java.lang.Object object,
java.lang.reflect.Method method) |
SimpleMethodInvoker(java.lang.Object object,
java.lang.String methodName,
java.lang.Class<?>... paramTypes) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.lang.Object |
invokeMethod(java.lang.Object... args) |
public SimpleMethodInvoker(java.lang.Object object, java.lang.reflect.Method method)
public SimpleMethodInvoker(java.lang.Object object, java.lang.String methodName, java.lang.Class<?>... paramTypes)
public java.lang.Object invokeMethod(java.lang.Object... args)
invokeMethod
in interface MethodInvoker
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object