Annotation Interface NotNull


@Target(FIELD) @Retention(RUNTIME) public @interface NotNull
Sets obligatory state for property value.

Value checks on validation step.

Applying to a Simple fields such as (Primitive types, links etc..), annotation restrict Null and ""(empty line) values.

Applying to a complex fields such as (Interface type field in which you can select another Script(Implementation interface)), annotation restrict Null values.

Applying to Array fields, annotation restrict empty arrays.

Annotation's predicate allows to set conditions for the applicability of constraints to null values.

  • {predicate == true} annotated fields wouldn't be able to pass null values.
  • {predicate == false} annotated fields will be able to pass null values.
Author:
Abdulin Ildar
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
  • Element Details

    • predicate

      String predicate
      Default:
      "true"