Why is Kotlin throw IllegalArgumentException when using Proxy
问题 This is the Kotlin equivalent of Java code using InvocationHandler : override fun invoke(proxy: Any?, method: Method?, args: Array<out Any>?): Any { println("before httprequest--->" + args) val ret = method!!.invoke(obj, args) println("after httprequest--->") return ret } Java code: public Object invoke(Object o, Method method, Object[] args) throws Throwable { System.out.println("jdk--------->http" + args); Object result=method.invoke(target, args); System.out.println("jdk--------->http");