reflect
使用指定 classLoader 打开一个局部反射作用域。
reflect {
val method = "com.example.Target".findMethod { name("run") }
}Content copied to clipboard
Parameters
classLoader
作用域内默认使用的 ClassLoader
block
在 ReflectScope 上执行的 DSL 代码块
使用当前 ClassLoader 作为默认加载器打开反射作用域。