I’m using Kotlin on ParparVM, which, aside from Class.forName(), and Class.newInstance(), doesn’t support any reflection. This works well, as long as the developer doesn’t use any classes that pull in Kotlin’s reflection libs.
The kotlin stdlib includes the kotlin.reflect package - most of which is out of bounds for us. The kotlin documation declares, for each class and method on this package, whether it is available in Common, JS, JVM, and native. And for many methods and classes, it shows that there are different signatures on different platforms. For example,
KClass signature is:
interface KClass<T : Any> : KClassifier
for Common and JS. But is
interface KClass<T : Any> : KDeclarationContainer, KAnnotatedElement, KClassifier
for JVM and Native
How does it achieve these dual API signatures? Is there a separate set of jars? I believe the signatures for the JS versions are more likely to be compatible with our VM, and I’d like to find a way to get a set of jars that include this more minimal API.
Any pointers appreciated.