Annotation Interface Size


@Target(FIELD) @Retention(RUNTIME) public @interface Size
Validates that a Collection or String config value has a size/length within the specified bounds. If the size is out of bounds, the module refuses to load naming the field, the counted size (Collection.size() or String.length()), and the violated bounds - the config file is never rewritten (D-01).
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    Maximum size (inclusive).
    int
    Minimum size (inclusive).
  • Element Details

    • min

      int min
      Minimum size (inclusive). Default: 0
      Default:
      0
    • max

      int max
      Maximum size (inclusive). Default: Integer.MAX_VALUE
      Default:
      2147483647