class DeclaredField<T>
A simple wrapper around a Field object providing type safe read and write access using value, ignoring the field's visibility.
DeclaredField(clazz: Class<*>, name: String, receiver: Any?)
A simple wrapper around a Field object providing type safe read and write access using value, ignoring the field's visibility. |
var value: T |
fun <T> Any.declaredField(name: String): DeclaredField<T>
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>
Returns a DeclaredField wrapper around the (possibly non-public) instance field of the receiver object, but declared in its superclass clazz. |