Annotation Interface RequiredOnlyIf


@Retention(RUNTIME) @Target(FIELD) public @interface RequiredOnlyIf
An annotation that indicates that an option/arguments is required only if some other option/options are present
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name(s) of the other option(s) that must be present for this to be a required option
  • Element Details

    • names

      String[] names
      The name(s) of the other option(s) that must be present for this to be a required option
      Returns:
      Names
      Default:
      {}