So JDK6 is thinking about including a standard ability to process annotations outside of a running jvm:
JSR 269: Pluggable Annotation-Processing API
http://www.jcp.org/en/jsr/detail?id=269
Relevant to this dicussion would be the ability to process annotations using the com.sun.mirror.* apis without loading classes. Has anyone looked at using these?
http://java.sun.com/j2se/1.5.0/docs/guide/apt/mirror/overview-summary.html
There was a discussion before (in the AOP forum?) about APT.
It is not really designed for what we want to do.
One major drawback was that it was singlepass/singleclass if IIRC.
Having said that, a CodeDOM like in .NET where you can pre-analyse
code to see what it needs and modify it (annotations/interfaces/mixins)
is pretty much what we need.
At least for the MC. General AOP has more requirements.
APT combined with the Java Compiler API effort:
http://www.jcp.org/en/jsr/detail?id=199
which is also being considered for jdk6 I would think be providing that info. I guess the big mismatch here is that these are source based tools and we really need bytecode based tools.