There are two facilities for expressing deprecation:
- @Deprecated annotation
- @deprecated Javadoc tag
These facilities were introduced in Java SE 5 and JDK 1.1, respectively. The @Deprecated annotation was intended to annotate program components that should not be used because they were deemed dangerous and/or there was a better option. That was the intended use. Actual use varied, and because warnings were only provided at compile time, there was little reason to ignore the annotated code.
The Enhanced deprecation effort was taken on to provide developers with clearer information regarding the intended disposition of the APIs in the specification documentation. Work on this also resulted in a tool for analyzing a program's use of deprecated APIs.
To support this fidelity in information, the following components have been added to the java.lang.Deprecated...