natario1
01/26/2023, 12:44 PMClass.forName("kotlin.Function0")
fails. And is there a way to have them exist? Maybe some compiler flag? I want to call the invoke function from JNI.dmitriy.novozhilov
01/26/2023, 12:47 PMkotlin.Function
and kotlin.coroutines.SuspendFunction
are not exists at runtime
On JVM they are mapped to kotlin.jvm.functions.FunctionN
natario1
01/27/2023, 10:25 AMkotlin.jvm.functions.Function(N+1)
. For the continuation I guessorg.jetbrains.kotlin.resolve.jvm.JvmClassName
. For lambdas but also more common things like kotlin/String, kotlin/Any (should be java/lang) which are hardly usefuldmitriy.novozhilov
01/27/2023, 10:36 AMnatario1
01/27/2023, 10:41 AMJvmClassName
to get a JVM friendly name, with /
, $
and so on. I was saying that it would be nice if JvmClassName
also did the string conversion between impossible types like kotlin/Any => java/lang/Object and more delicate ones like suspend functionsdmitriy.novozhilov
01/27/2023, 2:59 PMJvmClassName
is an internal utility which does what it does
If you want to map kotlin classes to java runtime you can use `KotlinTypeMapper`/`IrTypeMapper`udalov
01/31/2023, 12:39 PMJavaToKotlinClassMap
just for the class name mapping logicnatario1
01/31/2023, 2:59 PM