Incremental java compile AKA javac print compile dependencies
Jonathan Gibbons
jonathan.gibbons at oracle.com
Wed May 26 22:41:31 PDT 2010
On 05/26/2010 09:09 PM, Joshua Maurice wrote:
>
>> Currently the tools.jar API, aka JavacTask, gives access to the
>> parse tree of function bodies, but it does not give access to the
>> analyzed tree of function bodies.
>
Yes it does. After you call parse(), call analyze(). Then walk the
parse trees returned from parse(), and in conjunction with the various
utility APIs you can find the info you need.
Look at
com.sun.source.util.Trees
javax.lang.model.util.Elements
javax.lang.model.util.Types
If you get desperate, cast types down into the internal javac types, but
it should be possible to use just the public APIs in com.sun.source.*
and javax.lang.model.**
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20100526/4c0a61dc/attachment.html
More information about the compiler-dev
mailing list