Altering AST with javac Plugin
Gunnar Morling
gunnar at hibernate.org
Wed Jun 12 06:30:05 UTC 2019
Hi,
I recently came across a javac plug-in (i.e. implementation
of com.sun.source.util.Plugin) which alters/amends the AST of the classes
under compilation.
Is this an "officially" foreseen usage of that plug-in API? Or i this
rather a hack akin to annotation processor implementations that cast the
model types to the javac-internal ones in order to modify them? I'm
curious, because those AST-modifying annotation processors are troublesome
to deal with for other processors which won't "see" those amendments, so
I'm wondering whether one would or would not have similar issues when
altering the AST with such c.s.s.u.Plugin implementation.
Thanks,
--Gunnar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20190612/d08de100/attachment.html>
More information about the compiler-dev
mailing list