callStaticMethod
fun Class<*>.callStaticMethod(methodName: String, args: Args, argTypes: ArgTypes = argTypes(), returnType: Class<*>? = null): Any?
调用静态方法。
val result = targetClass.callStaticMethod("getInstance", args())Content copied to clipboard
自动匹配参数并调用静态方法。
val result = targetClass.callStaticMethod("getInstance")Content copied to clipboard