Announcing kotlinx-metadata-jvm library for reading/modifying metadata of Kotlin/JVM class files

Hello, (sorry if question isn’t directly relevant)

  • I would Like to get KmClass or kClass or just kotlin full name of
    the kclass parameter in my annotation inside my annotation processor
    I read above 2 comments This & This that kotlin.Metadata don’t hold annotations info
    but this can be done by external means So can you please tell me how to achieve
    my goal by external means because I don’t understand.

  • For more clarification take a look at the code below

// Another developer’s code using my library
@MyAnn(kClass = List::class)

// My annotation processor code
val myAnn = element.getAnnotationsByType(MyAnn::class.java).first()

// how to get KmClass or KClass or just String of full kotlin class name
// using myAnn.kClass

// ALSO Note what i currently can do is get it in a TypeMirror instance
// but that has a problem for ex. it shows above example as
// java.util.List instead of kotlin.collections.List

Thanks in Advance.