public static MethodInvocation create(Object object, String methodName,
			Object... args) {
		Assert.notNull(object, "Object required");

		Class<?>[] classArgs = null;

		if (args != null) {
			classArgs = new Class<?>[args.length];

			for (int i = 0; i < args.length; i++) {
				classArgs[i] = args[i].getClass();
			}
		}

		// Determine the type that declares the requested method, taking into account
		// proxies
		Class<?> target = AopUtils.getTargetClass(object);
		if (object instanceof Advised) {
			Advised a = (Advised) object;
			if (!a.isProxyTargetClass()) {
				Class<?>[] possibleInterfaces = a.getProxiedInterfaces();
				for (Class<?> possibleInterface : possibleInterfaces) {
					try {
						possibleInterface.getMethod(methodName, classArgs);
						// to get here means no exception happened
						target = possibleInterface;
						break;
					}
					catch (Exception ignored) {
						// try the next one
					}
				}
			}
		}

		return createFromClass(object, target, methodName, classArgs, args);
	}