Annotation Interface NotNull


This is a custom annotation that can be used to mark methods, fields, parameters, local variables, and type usages as not nullable.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class<? extends Exception>
    The exception to be thrown if the annotated element is null.
    A description of why the annotated element cannot be null.
  • Element Details

    • value

      String value
      A description of why the annotated element cannot be null.
      Default:
      ""
    • exception

      Class<? extends Exception> exception
      The exception to be thrown if the annotated element is null.
      Returns:
      the exception to be thrown if the annotated element is null
      Default:
      java.lang.Exception.class