Annotation Type Nullable

  • @Documented
    public @interface Nullable
    The annotated element can be null under some circumstance. We consequently use the convention of no annotation means not nullable. All API packages there for have the annotation NonNullApi

    The annotation name Nullable is sufficient for static analysis frameworks like NullAway. For additional compatibility with Kotlin this is a nickname of the JSR305 annotation. For this to work the JSR305 annotations do not need to be on the class path.

    This approach is identical to the Spring framework.

    Jens Wilke
    See Also: