If all I want from reflection is `any::class.simpl...
# announcements
k
If all I want from reflection is
any::class.simpleName
, does that still require including the Kotlin Reflection jar?
f
Yes, but you can always use Java reflection.
k
All I need is for a class to return its simple name, but its within a MPP context
I suppose I can write a simple Expect method exposing that instead of including the reflection jar
d
I don't think you need the reflect lib for that actually
Perhaps that's only the case in JVM
f
https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/src/kotlin/reflect/KClass.kt seems you're right,
simpleName
is directly defined in the stdlib.
😁 1
k
I thought the same thing but it crashed on Android
f
The
qualifiedName
also doesn't work in JS...