Hi, this might be me that has missed something fun...
# ksp
o
Hi, this might be me that has missed something fundamentally about KSP, but I was wondering; Is there a way to get the annotation of an annotation that is in a different module than the element that is annotated? 🤔 I can get the base annotation from the
XRoundEnv.getElementAnnotatedBy
if I know the qualifiedName of the annotation in question. However, if I use the typeName of the annotation that I get from
XRoundEnv.getElementAnnotatedBy
to fetch the annotation that the first annotation is annotated with, it only works if they are in the same module. Does anyone know if this is possible? 😄 Is it not working because I use the typeName form the first annotation?
y
Not sure if i understand properly but if you want to find annotated elements that live in other modules, that won't work. Get elements annotated with will only return elements that are currently being compiled. This is by design and also how Java apt works
o
Sorry for bad formulation. That makes sense 🙂 Thanks!