public static MethodInvocation createFromClass(Class clazz, String methodName, Class[] args) { Assert.notNull(clazz, "Class required"); Assert.hasText(methodName, "MethodName required");  Method method;  try { method = clazz.getMethod(methodName, args); } catch (Exception e) { return null; }  return new SimpleMethodInvocation(method, args);
public static MethodInvocation createFromClass(Class clazz, String methodName) { return createFromClass(clazz, methodName, null, null);
    public static MethodInvocation createFromClass(Class clazz, String methodName, Class[] args) {        Assert.notNull(clazz, "Class required");        Assert.hasText(methodName, "MethodName required");        Method method;        try {            method = clazz.getMethod(methodName, args);        } catch (Exception e) {            return null;        }        return new SimpleMethodInvocation(method, args);    }