class Delegate() { var ab: String = "" operator fun getValue(thisRef: Any?, prop: KProperty<*>): String { return "$thisRef, thank you for delegating ${prop.name} to me with value ${ab}!" } operator fun setValue(thisRef: Any?, prop: KProperty<*>, value: String) { this.ab = value println("$value has been assigned to ${prop.name} in $thisRef") } }