[JSR308] Type annotation syntax for arrays

Michael Ernst mernst at csail.mit.edu
Mon Oct 27 06:22:16 EDT 2008


In August, the JSR 308 specification changed the syntax for array
annotations.  From the changelog:

  Array syntax is now uniformly prefix:
    @English String @NonNull [] @Length(10) []
  is a non-null array of length-10 arrays of English Strings.

I have heard only positive comments about this, so I assume that everyone
is happy with the improvement.  The design is discussed in section B.3 of
the the non-normative part of the specification:

  http://pag.csail.mit.edu/jsr308/specification/java-annotation-design.html#array-syntax

                    -Mike



More information about the JSR308 mailing list