getObjectFieldOrNullAs

fun <T> Any.getObjectFieldOrNullAs(fieldName: String): T?

读取实例字段并转为指定类型,失败时返回 null

Parameters

fieldName

字段名