@SubtypeOf(value=MonotonicNonNull.class) @DefaultQualifierInHierarchy @DefaultFor(value=EXCEPTION_PARAMETER) @DefaultInUncheckedCodeFor(value={PARAMETER,LOWER_BOUND}) @Documented @Retention(value=RUNTIME) @Target(value={TYPE_USE,TYPE_PARAMETER}) public @interface NonNull
NonNull
is a type annotation that indicates that an expression is never null
.
For fields of a class, the NonNull
annotation indicates that this field is never
null
after the class has been fully initialized. Class initialization is
controlled by the Freedom Before Commitment type system, see InitializationChecker
for more details.
For static fields, the NonNull
annotation indicates that this field is never null
after the containing class is initialized.
This annotation is rarely written in source code, because it is the default.
This annotation is associated with the AbstractNullnessChecker
.
Nullable
,
MonotonicNonNull
,
AbstractNullnessChecker