getField

@Nullable
open fun getField(field: Field, @Nullable target: @Nullable Any): @Nullable Any

Get the field represented by the supplied field object on the specified target object. In accordance with get semantics, the returned value is automatically wrapped if the underlying field has a primitive type.

Thrown exceptions are handled via a call to handleReflectionException.

Return

the field's current value

Parameters

field

the field to get

target

the target object from which to get the field (or null for a static field)