staticFieldValueOrNull

fun Class<*>.staticFieldValueOrNull(fieldName: String, type: Class<*>? = null): Any?

读取静态字段值,失败时返回 null

Parameters

fieldName

字段名

type

可选字段类型,用于进一步确认匹配结果