Learn More About Java Type Annotations
By Scott Hommel-Oracle on Mar 25, 2014
Java SE 8 brings a variety of improvements to the "metadata" features of the Java language and libraries. Annotations are more flexible and useful than ever. Annotations can now be applied anywhere a type is used, which enables stronger type checking of your code, and the same annotation type can be applied more than once to the same declaration or type use. It is also now possible to reflect over the names of method parameters.
For more information about annotations and reflection, see the following resources:
The screencast Enhanced Metadata Features: Annotations describes the new features and discusses some factors that influenced their design. It also explains how custom type checkers can use annotations to improve code quality and demonstrates checkers for dimensioned units and implicit enum types.
Java 8 Launch has screencasts that describe the feature.
See What's New in JDK 8 for information about other new features in JDK 8.