IntelliJ IDEA 2018.1 Help

@ParametersAreNonnullByDefault Annotation

Overview

Annotation @ParametersAreNonnullByDefault gives the developer an option to define that for a given class or package all the elements (methods, parameters, fields and variables) have @NotNull semantic, unless they are explicitly annotated with the @Nullable annotation.

This is done by adding annotation @javax.annotation.ParametersAreNonnullByDefault to the entire package, class, or method.

To use @javax.annotation.ParametersAreNonnullByDefault annotation, make sure that jsr305 jars are added to the module libraries.