setObject

fun setObject(obj: Any, fieldName: String, value: Any?)

Set the field object by the name in the object.

Parameters

obj

object

fieldName

field name

Throws

if the field is not found


fun setObject(obj: Any, fieldName: String, value: Any?, clazz: Class<*>? = null)

Set the field object by the name in the object.

Parameters

obj

object

fieldName

field name

clazz

class where the field is declared (optional, defaults to the class of 'obj')

Throws

if the field is not found