The javac command in Java 6 supports JSR 269 annotation processors. We should explore whether we can leverage the features provided by the javac compiler during joint compilation (JSR 199 compiler API?) or provide some kind of native support. This overlaps with (and maybe maps directly on to) how ASTTransformations (@Grab, @Grapes) work - though there are some differences too which would need to be addressed.
For a brief discussion starting point related to one use of such a feature, see: