get Reflected Field
external fun getReflectedField(declaringClass: Class<*>, name: String, jniSig: String, isStatic: Boolean? = null): Field?
Retrieve a reflected Field object using native lookup.
----------------通过 Native 查找并获取反射 Field 对象。
// Get instance field "value" from String
getReflectedField(String::class.java, "value", "[B")
// Get static field "CASE_INSENSITIVE_ORDER" from String
getReflectedField(String::class.java, "CASE_INSENSITIVE_ORDER", "Ljava/util/Comparator;")Content copied to clipboard
Return
The reflected Field object, or null if not found / 反射的 Field 对象,如果未找到则返回 null
Parameters
declaring Class
declared class / 声明该字段的类
name
field name / 字段名称
jni Sig
type signature of the field / 字段的类型签名
is Static
If null, native auto check / 如果为 null,native 自动判断