CHAPTER 23

Annotations

What are annotations? From Java 5 onwards there is a new reference data type added in the Java language, which allows us to annotate any programming element. Annotations are used like modifiers, which are created by the developer. We can create annotations which can be used with any kind of target type (programming element) within the Java source file. These are kinds of additional modifiers which a developer creates, normally to be used by some other kinds of processing tools (known as Annotation Processing Tools). javadoc is an example of a similar tool. It works on the Java source file. It processes the source file and generates the documentation. While processing the Java source file the javadoc utility uses the documentation ...

Get The class of Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.