Bernhard
11/21/2018, 10:16 AMdiesieben07
11/21/2018, 10:18 AMClass<T> or Class<String> after compilation, only Class.
But if you do T::class with a reified T, then you will get the proper Class instance.diesieben07
11/21/2018, 10:18 AMBernhard
11/21/2018, 10:25 AMBernhard
11/21/2018, 10:26 AMmapper.fromJson<ArrayList<AdditionalFunction>>(it, object : TypeToken<ArrayList<AdditionalFunction>>() {}.type)Bernhard
11/21/2018, 10:27 AMmapper.fromJson<ArrayList<T>>(it, object : TypeToken<ArrayList<T>>() {}.type)Bernhard
11/21/2018, 10:27 AMBernhard
11/21/2018, 10:28 AMfunc<AdditionalFunction>()diesieben07
11/21/2018, 10:28 AMBernhard
11/21/2018, 10:28 AMBernhard
11/21/2018, 10:28 AMBernhard
11/21/2018, 10:29 AMBernhard
11/21/2018, 10:31 AMBernhard
11/21/2018, 10:32 AMdiesieben07
11/21/2018, 10:33 AMprivate inline fun <reified R> a() {
println(object : TypeToken<R>() {})
}
fun main(args: Array<String>) {
a<ArrayList<String>>()
}Bernhard
11/21/2018, 10:34 AMBernhard
11/21/2018, 10:35 AMdiesieben07
11/21/2018, 10:37 AM