public static MethodInvocation create(Object object, String methodName, Object[] args) { Assert.notNull(object, "Object required");  Class[] classArgs = null;  if (args != null) { List list = new ArrayList();  for (int i = 0; i < args.length; i++) { list.add(args[i].getClass()); }  classArgs = (Class[]) list.toArray(new Class[] {}); }  return createFromClass(object.getClass(), methodName, classArgs);
public static MethodInvocation create(Object object, String methodName) { return create(object, methodName, null);
    public static MethodInvocation create(Object object, String methodName, Object[] args) {        Assert.notNull(object, "Object required");        Class[] classArgs = null;        if (args != null) {            List list = new ArrayList();            for (int i = 0; i < args.length; i++) {                list.add(args[i].getClass());            }            classArgs = (Class[]) list.toArray(new Class[] {});        }        return createFromClass(object.getClass(), methodName, classArgs);    }