Andreas Sinz
02/11/2018, 9:28 PMinline fun <reified T> sharedPrefs<T>(): MyDelegate = MyDelegate(T::class)
class MyDelegate(private val cls: KClass<*>) {
operator fun getValue(thisRef: Any?, property: KProperty<*>): String {
when(cls) {
Int::class ->
.....
}
.....
}