MutableClassDeclaration has getDeclaredFields(), which gives me a list of MutableFieldDeclaration. From a field declaration, I can get the type of the field through FieldDeclaration.getType(). I then have a TypeReference. I was expecting to be able to then call getAnnotations() on a TypeReference, but I can't.
Thanks,
Christian
Sorry I forgot a part in there. You have to check whether the returned type is instanceof AnnotationTarget. Only then can you use findAnnotation. Some subclasses of Type cannot have annotations.
--
You received this message because you are subscribed to a topic in the Google Groups "Xtend Programming Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xtend-lang/FL0NS9aBWuc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alright, that did work :-)