Can reflection tell me if a KClass is an enum or n...
# reflect
v
Can reflection tell me if a KClass is an enum or not? There doesn't seem to be an isEnum method.
b
Maybe
kClass.isSubclassOf(Enum::class)
v
Thanks. I'll try that out. I hope nobody writes complex nested enums!
r
On the JVM, you can use java.lang.Class#isEnum()