Annotation Interface Required


@Retention(RUNTIME) @Target({METHOD,FIELD}) public @interface Required
The Required annotation defines dependencies between the properties.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    A list of the elements that are allowed to activate the current property.
    The addressed property.
    boolean
    The boolean value that is necessary to activate the current property.
  • Element Details

    • property

      String property
      The addressed property. This property has to be an enum type.
      Returns:
      the required property
      Default:
      ""
    • elements

      String[] elements
      A list of the elements that are allowed to activate the current property.
      Returns:
      allowed elements
      Default:
      {}
    • value

      boolean value
      The boolean value that is necessary to activate the current property.
      Returns:
      boolean value
      Default:
      true