[JSR308] New version of JSR 308 working document

Michael Ernst mernst at csail.mit.edu
Mon Oct 29 13:10:59 EDT 2007

I've placed a new version of the JSR 308 working document at these URLs:


The changelog entry follows my signature.


Changes to normative section:

 * Use new ElementType.TYPEREF enum constant for type annotations,
   instead of overloading the existing ElementType.TYPE enum constant.

Changes to non-normative section:

 * Add new example of need for annotations on array elements (non-null
   type system with non-null default).

 * Clarify the principle that annotations should not affect behavior: in
   the absence of an annotation processor, the compiler produces the
   same bytecodes for annotated code as it would have for the same code
   without annotations.

 * Discuss backward-compatibility with Java 5 annotation processors,
   including reading annotations from files produced by Java 5
   compilers, and putting annotations in files when the -target 5 switch
   is supplied to javac.

 * Note a problem with desugaring duplicate annotations into arrays: it
   loses ordering information among different annotations. Also add
   another approach to duplicate annotations: adding a getAnnotations
   method like the current getAnnotation method.

 * Expand discussion of permitting annotations to subclass one another,
   including providing some use cases and explaining some potential

Editorial improvements:

 * Fix placement of figures in PDF version of document.

More information about the JSR308 mailing list