getObjectOrNullUntilSuperclass

fun getObjectOrNullUntilSuperclass(obj: Any, fieldName: String, untilSuperClass: Class<*>.() -> Boolean? = null): Any?

Get the field object by the name in the object.

Return

field object or null

Parameters

obj

object

fieldName

field name

untilSuperClass

until super class(true = break, false = continue), null = find in all superclasses.

Throws

if the field is not found