declaredField

Returns a DeclaredField wrapper around the declared (possibly non-public) instance field of the receiver object.


fun <T> Any.declaredField(clazz: KClass<*>, name: String): DeclaredField<T>
fun <T> Any.declaredField(clazz: Class<*>, name: String): DeclaredField<T>

Returns a DeclaredField wrapper around the (possibly non-public) instance field of the receiver object, but declared in its superclass clazz.