Annotation Interface NotNull


@Retention(RUNTIME) @Target(FIELD) public @interface NotNull
Validates that a field is not null.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether validation failure should fail fast (prevent plugin enable).
    The error message.
    An optional suggestion shown after the error message describing how to fix it.
  • Element Details

    • message

      String message
      The error message.
      Returns:
      the message
      Default:
      "Value cannot be null"
    • failFast

      boolean failFast
      Whether validation failure should fail fast (prevent plugin enable).
      Returns:
      true to fail fast
      Default:
      true
    • suggestion

      String suggestion
      An optional suggestion shown after the error message describing how to fix it. Empty by default (no suggestion).
      Returns:
      the suggestion, or empty for none
      Default:
      ""