getStaticObjectOrNullAs

fun <T> getStaticObjectOrNullAs(clazz: Class<*>, fieldName: String): T?

Get the static object, and trying to cast to the T type

Return

T field object or null

Parameters

clazz

class

fieldName

field name

Throws

if the field is not found