How to access elements outside an Annotation Processor
Stéphane NICOLAS
steff.nicolas at gmail.com
Sat Jul 8 18:00:55 UTC 2017
Hi there,
my last question about elements (de)serialization didn't really catch your
attention, but I try again !
:)
I would like to have the advises of people on this list to access elements
outside an AP.
Context: I am developing a build tool and would need, given a list of
files, to access all elements annotated with a given set of annotations.
I read the javac's compiler code and found out that javac does it via the
JavaProcessingEnvironment, that create a RoundEnvironment that in turn uses
a TypeUtil instance and a visitor to scan all elements and return those
which are annotated.
But the internals of javac are a bit complex, is there a simpler way to do
this ? What would you recommend ?
Please note that I want to do this BEFORE annotation processing itself,
hence I can't use an Annotation Processor to achieve it.
Thanks in advance and thanks for this amazing compiler !
S.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20170708/df2e21c6/attachment.html>
More information about the compiler-dev
mailing list