https://kotlinlang.org logo
Title
j

jameskleeh

12/22/2021, 9:30 PM
I’m trying to get the fully qualified name of an annotation that isn’t on the classpath. Unfortunately KSAnnotation only has
shortName
. It looks like the FQN is there in the descriptor, but I don’t know how to access it. Anyone have any idea? Thanks in advance
y

yigit

12/22/2021, 9:39 PM
Not sure if you can access a class if it is not in the classpath. What is your user case?
j

jameskleeh

12/22/2021, 9:49 PM
I don’t need access to the class itself, just the name of the annotation
The use case is we store annotation metadata which requires the annotation name
As you can see here the qualified name is there
j

Jiaxiang

12/22/2021, 10:09 PM
if the FQN is there in the descriptor, can you try to get the
annotationType
and then resolve it?
j

jameskleeh

12/23/2021, 3:40 AM
yeah but it produces an error type