For the impatient: Download and use pluggable type-checkers now.
The Java 6 annotation syntax is useful but limited. The Type Annotations
syntax permits annotations to be written in more places, such as generic
Programmers can use type annotations to write more informative types, and
then tools such as type-checkers can detect and prevent more errors.
Type annotations are planned to be part of the Java language and will be supported by Oracle's OpenJDK (for JDK 8). However, you can use them now by downloading our free, open-source tools. They are completely backward-compatible, so you can gain the benefits of type annotations while working with people who are using other versions of Java, such as Java 6, 5, or even 4. Furthermore, our tools have features and bug fixes that Oracle has not yet incorporated into OpenJDK. Therefore, until Oracle incorporates those bug fixes, we do not recommend that you use the OpenJDK for type annotation processing or pluggable type-checking.
The Type Annotations Specification (also known as "JSR 308") is available below. It describes the minor, backward-compatible changes to the Java language and classfile format. An implementation is publicly available, along with tools that use the annotations to find and prevent bugs.
Most users only need to download the Checker Framework. Just follow the Installation instructions and tutorial.
More details and additional downloads appear below.
.classfiles. It also provides a representation (called an “annotation file”) for annotations that is outside the source code or the
.classfile. The tools support both Java 5 annotations, and the type annotations defined in JSR 308.
If you have a question, then first see whether your question is answered in one of the manuals listed under Documentation below. If none of those documents answers your question, then use one of the mailing lists.
The mailing lists are appropriate for discussing the Type Annotations (JSR 308) specification, any tool that processes type annotations (compiler, the Checker Framework, the Annotation File Utilities, etc.), and any other issue related to type annotations. We welcome questions, bug reports, suggestions, reports about case studies, and other contributions. Let us know how we can make type annotations even better!
To submit a bug report, use the issue tracker for the relevant tool:
Last updated: January 30, 2017