In Kotlin
, you can get KClass
as follows.
val myKClass: KClass<*> = MyClass::class
This acquisition process is performed by Java
.
You can do it with JvmClassMappingKt.getKotlinClass
.
final KClass<?> myKClass = JvmClassMappingKt.getKotlinClass(MyClass.class);
Recommended Posts