Annotation Type ProtoReserved.Range


  • public static @interface ProtoReserved.Range
    A range of field numbers or enum constants. The upper bound can be left unspecified if 'max' is desired. The acceptable values for from() and to() are different for fields vs. enum constants.
    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static int MAX_ENUM
      Maximum allowed value for enums.
      static int MAX_FIELD
      Maximum allowed value for field numbers.
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      int from
      The start of the range (inclusive).
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      int to
      The end of the range (inclusive).
    • Field Detail

      • MAX_FIELD

        static final int MAX_FIELD
        Maximum allowed value for field numbers.
      • MAX_ENUM

        static final int MAX_ENUM
        Maximum allowed value for enums.
    • Element Detail

      • from

        int from
        The start of the range (inclusive). Minimum value is 1 for field numbers, but can be any 32-bit value for enums (including negative values).
      • to

        int to
        The end of the range (inclusive). Must be strictly greater than from(). The actual maximum is MAX_FIELD (229-1 = 536870911) for field numbers, but it can be any 32-bit value for enums.
        Default:
        2147483647