So, now we have JSR 175, and we can create all of these annotations. But this is of little use without the semantic understanding that comes with noting down what @Foo(Bar=”whee”) actually means.
Who gets to define these annotations? Each expert group could do this, but what about overlaps?
It looks like Rajiv Mordani of Sun wants to nip this in the bud and has created JSR 250: Common Annotations for the Java Platform which aim to:
This JSR well develop annotations for common semantic concepts in the J2SE and J2EE platforms that apply across a variety of individual technologies. With the addition of JSR 175 (A Metadata Facility for the JavaTM Programming Language) in the Java platform we envision that various JSRs will use annotations to enable a declarative style of programming. It would be unfortunate if these JSRs each independently defined their own annotations for common concepts. It would be especially valuable to have consistency within the J2EE 5.0 component JSRs, but it will also be valuable to allowconsistency between J2EE and J2SE. It is the intention of this JSR to define a small set of common annotations that will be available for use within other JSRs. It is hoped that this will help to avoid unnecessary redundancy or duplication between annotations defined in different JSRs. The exact set of annotations will be developed in consultation with the various specifications leads who are currently planning to use annotations within their JSRs.
It will be interesting to know what they are actually thinking here.