The Java 5 annotation syntax is useful but limited. The Type Annotations
project is implementing a Java language extension that permits annotations
to be written on uses of types. One example of the new syntax is generic
type arguments, as in List<@NonNull Object>
. The type
annotation syntax is also known as "JSR 308".
This Project is sponsored by the OpenJDK Compiler Group and is targeted for inclusion in Java 7.
The Type Annotations specification indicates changes to the Java language and platform.
(This should also point at the Mercurial repository.)
Several other tools already use the type annotation syntax.
@NonNull
type qualifier.
@ReadOnly
type qualifier.
.java
and .class
files.