Getting simpleName() after getClass() in Kotlin
Use someObject::class.java.simpleName
.
There is couple ways to do this in Kotlin You can receive the name via property - KClass.qualifiedName
val name = AClass::class.qualifiedName;
or through the Class.getName
val name = AClass::class.java.getName();
or you can try with Class.name
val name = AClass::class.java.name;
or Class.canonicalName
var name = AClass::class.java.canonicalName as String