spring-framework / org.springframework.lang / NonNullFields

NonNullFields

@Target([]) @Nonnull @TypeQualifierDefault(ElementType.FIELD) class NonNullFields

A common Spring annotation to declare that fields are to be considered as non-nullable by default for a given package.

Leverages JSR-305 meta-annotations to indicate nullability in Java to common tools with JSR-305 support and used by Kotlin to infer nullability of Spring API.

Should be used at package level in association with Nullable annotations at field level.

Author
Sebastien Deleuze

Since
5.0

See Also
NonNullFieldsNullableNonNull

Constructors

<init>

NonNullFields()

A common Spring annotation to declare that fields are to be considered as non-nullable by default for a given package.

Leverages JSR-305 meta-annotations to indicate nullability in Java to common tools with JSR-305 support and used by Kotlin to infer nullability of Spring API.

Should be used at package level in association with Nullable annotations at field level.