X

Musings on JDK development

JSR 269 in proposed final draft

I'm happy to announce that JSR 269 has progressed to the proposed final draft stage of the JCP process. This draft corresponds to the version of JSR 269 implemented in build 98 of JDK 6. Please send comments to jsr-269-comments@jcp.org.

Changes from the public review draft include:

  • Adding originating elements var-args parameters to the Filer create methods to enable better management of dependencies.
  • Changing the return type of the getFooName methods to a separate Name extends CharSequence interface.
  • Revised Type visitor structure
  • Included a description of the annotation processing discovery process.
  • Various specification clarifications:
    • More explicit null pointer defaults.
    • The modeling API is meant to be used for multiple purposes, including but not limited to annotation processing.
    • More notes on anticipated evolution of the API.

Join the discussion

Comments ( 2 )
  • Andrés Testi Sunday, September 24, 2006
    Joseph, I like the new Annotation Processing feature. But, I want to know if it's possible to implement an AOP engine whit Annotation Processing. Really, this approach can locate Java on top of Meta programming.
    Cheers.
  • Joseph D. Darcy Tuesday, September 26, 2006

    Andrés, the JSR 269 annotation processing API is designed to be read-only in the sense of not supporting overwriting the files being processed. Therefore, it is not intended to be used directly for AOP purposes. However, various parties have built AOP frameworks by extending JSR 269's predecessor apt; for example Spoon.

    To achieve effects similar to AOP using the standard JSR 269 API, you can use variations of the decorator pattern by having the annotation
    processor generate either the superclass or subclass(es) of the annotated class. For some further discussion, see this thread and other threads in the annotation processing forum. Also see some of the features in Bruce Chapman's rapt project.

    The NetBeans Jackpot project uses the model API from JSR 269 to support structured manipulation of source code; for more details, read one of Tom Ball's blog entries.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.