Package org.springframework.lang


package org.springframework.lang
Common annotations with language-level semantics: nullability as well as JDK API indications. These annotations sit at the lowest level of Spring's package dependency arrangement, even lower than org.springframework.util, with no Spring-specific concepts implied.

Used descriptively within the framework codebase. Can be validated by build-time tools (for example, FindBugs or Animal Sniffer), alternative JVM languages (for example, Kotlin), as well as IDEs (for example, IntelliJ IDEA or Eclipse with corresponding project setup).

  • Annotation Interfaces
    Class
    Description
    Inspired from org.jetbrains.annotations.Contract, this variant has been introduce in the org.springframework.lang package to avoid requiring an extra dependency, while still following the same semantics.
    A common Spring annotation to declare that annotated elements cannot be null.
    A common Spring annotation to declare that parameters and return values are to be considered as non-nullable by default for a given package.
    A common Spring annotation to declare that fields are to be considered as non-nullable by default for a given package.
    A common Spring annotation to declare that annotated elements can be null under certain circumstances.