I have a metadata / reflect question. How can I ge...
# reflect
g
I have a metadata / reflect question. How can I get the
KClass
or
Class
from a
KmType
? For example, I have a
KmType
with the classifier being
KmClassifier.Class
which gives the name
kotlin/collections/List
. I have tried
Class.forName(...)
with it by replacing the
/
with
.
, but it doesn't work because the JVM type is actually
java.util.List
, so it throws a
ClassNotFoundException
for
kotlin.collections.List
. This is also true for things like
kotlin/Float
. Anyone knows a solution for this problem?