Annotation Interface MaxLength


@Retention(RUNTIME) @Target(FIELD) @Documented public @interface MaxLength
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    int
    The maximum length of the value(s) of your entry.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
    The maximum array length of your entry.
    boolean
    If the array should be fixed size.
  • Element Details

    • value

      int value
      The maximum length of the value(s) of your entry. Defaults to 32 if the annotation is not set. Numerical values ignore this.
      Returns:
      int value deciding the max character length of your value.
    • arrayValue

      int arrayValue
      The maximum array length of your entry. Ignored if entry is not an array or list.
      Returns:
      int value deciding the maximum length of your array.
      Default:
      -1
    • fixedArray

      boolean fixedArray
      If the array should be fixed size. !!DOES NOT PROTECT AGAINST DIRECT CODE CHANGES!!
      Returns:
      boolean value.
      Default:
      false