@Nullable
and @NotNull
annotations introduced in IntelliJ IDEA for catching NullPointerException
's (NPE's) through the Constant Conditions & Exceptions and @Nullable problem inspections.
The org.jetbrains.annotations
project is open-source, hosted at GitHub. A few other annotations are included: @Nls
& @NonNls
for localization, @PropertyKey
for resource bundles, and @TestOnly
for testing.
To download the library of annotations, see the GitHub page.
Maven:
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>16.0.2</version>
</dependency>