IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

Annotations

Last modified: 29 March 2023

Annotations are pieces of metadata that provide information about code elements, such as classes, methods, or parameters.

Annotation general

In Java, there is a set of built-in annotations. Also, many libraries and frameworks, such as Spring and Lombok define their own annotations. The metadata provided by these annotations can be used both at compile- and run-time, for example, to generate boilerplate code, or interact with the user classes through reflection.