FieldAccessor

class FieldAccessor<T>(fieldName: String?) : ReadWriteProperty<Any, T>

A delegate that provides efficient accessing of a field via reflection.

Parameters

T

The type of the field.

fieldName

The name of the field. If null, will use the property name.

Constructors

Link copied to clipboard
constructor(fieldName: String?)

Functions

Link copied to clipboard
open operator override fun getValue(thisRef: Any, property: KProperty<*>): T
Link copied to clipboard
open operator override fun setValue(thisRef: Any, property: KProperty<*>, value: T)