StackOverflow 文件 Kotlin 教程 委託屬性 定製授權 定製授權 Created: November-22, 2018 class MyDelegate { operator fun getValue(owner: Any?, property: KProperty<*>): String { return "Delegated value" } } val foo : String by MyDelegate() println(foo) 該示例列印 Delegated value 延遲初始化可觀察的屬性