// String.class here is the parameter type, that might not be the case with youMethod method = clazz.getMethod("methodName", String.class);Object o = method.invoke(null, "whatever");如果方法是私有使用
getDeclaredMethod()而不是
getMethod()。并调用
setAccessible(true)方法对象。



