Package com.google.protobuf
Enum Class DescriptorProtos.Edition
- All Implemented Interfaces:
Internal.EnumLite,ProtocolMessageEnum,Serializable,Comparable<DescriptorProtos.Edition>,Constable
- Enclosing class:
- DescriptorProtos
public static enum DescriptorProtos.Edition
extends Enum<DescriptorProtos.Edition>
implements ProtocolMessageEnum
The full set of known editions.Protobuf enum
google.protobuf.Edition-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPlaceholder editions for testing feature resolution.EDITION_2_TEST_ONLY = 2;Editions that have been released.EDITION_99997_TEST_ONLY = 99997;EDITION_99998_TEST_ONLY = 99998;EDITION_99999_TEST_ONLY = 99999;Legacy syntax "editions".EDITION_PROTO3 = 999;A placeholder for an unknown edition value. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intPlaceholder editions for testing feature resolution.static final intEDITION_2_TEST_ONLY = 2;static final intEditions that have been released.static final intEDITION_99997_TEST_ONLY = 99997;static final intEDITION_99998_TEST_ONLY = 99998;static final intEDITION_99999_TEST_ONLY = 99999;static final intLegacy syntax "editions".static final intEDITION_PROTO3 = 999;static final intA placeholder for an unknown edition value.private static final Internal.EnumLiteMap<DescriptorProtos.Edition>private final intprivate static final DescriptorProtos.Edition[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DescriptorProtos.EditionforNumber(int value) static final Descriptors.EnumDescriptorReturn the enum type's descriptor, which contains information about each defined value, etc.final intReturn the value's numeric value as defined in the .proto file.Return the value's descriptor, which contains information such as value name, number, and type.static DescriptorProtos.EditionvalueOf(int value) Deprecated.static DescriptorProtos.EditionReturns the enum constant of this class with the specified name.static DescriptorProtos.EditionReturns the enum constant of this class with the specified name.static DescriptorProtos.Edition[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EDITION_UNKNOWN
A placeholder for an unknown edition value.
EDITION_UNKNOWN = 0; -
EDITION_PROTO2
Legacy syntax "editions". These pre-date editions, but behave much like distinct editions. These can't be used to specify the edition of proto files, but feature definitions must supply proto2/proto3 defaults for backwards compatibility.
EDITION_PROTO2 = 998; -
EDITION_PROTO3
EDITION_PROTO3 = 999; -
EDITION_2023
Editions that have been released. The specific values are arbitrary and should not be depended on, but they will always be time-ordered for easy comparison.
EDITION_2023 = 1000; -
EDITION_1_TEST_ONLY
Placeholder editions for testing feature resolution. These should not be used or relyed on outside of tests.
EDITION_1_TEST_ONLY = 1; -
EDITION_2_TEST_ONLY
EDITION_2_TEST_ONLY = 2; -
EDITION_99997_TEST_ONLY
EDITION_99997_TEST_ONLY = 99997; -
EDITION_99998_TEST_ONLY
EDITION_99998_TEST_ONLY = 99998; -
EDITION_99999_TEST_ONLY
EDITION_99999_TEST_ONLY = 99999;
-
-
Field Details
-
EDITION_UNKNOWN_VALUE
public static final int EDITION_UNKNOWN_VALUEA placeholder for an unknown edition value.
EDITION_UNKNOWN = 0;- See Also:
-
EDITION_PROTO2_VALUE
public static final int EDITION_PROTO2_VALUELegacy syntax "editions". These pre-date editions, but behave much like distinct editions. These can't be used to specify the edition of proto files, but feature definitions must supply proto2/proto3 defaults for backwards compatibility.
EDITION_PROTO2 = 998;- See Also:
-
EDITION_PROTO3_VALUE
public static final int EDITION_PROTO3_VALUEEDITION_PROTO3 = 999;- See Also:
-
EDITION_2023_VALUE
public static final int EDITION_2023_VALUEEditions that have been released. The specific values are arbitrary and should not be depended on, but they will always be time-ordered for easy comparison.
EDITION_2023 = 1000;- See Also:
-
EDITION_1_TEST_ONLY_VALUE
public static final int EDITION_1_TEST_ONLY_VALUEPlaceholder editions for testing feature resolution. These should not be used or relyed on outside of tests.
EDITION_1_TEST_ONLY = 1;- See Also:
-
EDITION_2_TEST_ONLY_VALUE
public static final int EDITION_2_TEST_ONLY_VALUEEDITION_2_TEST_ONLY = 2;- See Also:
-
EDITION_99997_TEST_ONLY_VALUE
public static final int EDITION_99997_TEST_ONLY_VALUEEDITION_99997_TEST_ONLY = 99997;- See Also:
-
EDITION_99998_TEST_ONLY_VALUE
public static final int EDITION_99998_TEST_ONLY_VALUEEDITION_99998_TEST_ONLY = 99998;- See Also:
-
EDITION_99999_TEST_ONLY_VALUE
public static final int EDITION_99999_TEST_ONLY_VALUEEDITION_99999_TEST_ONLY = 99999;- See Also:
-
internalValueMap
-
VALUES
-
value
private final int value
-
-
Constructor Details
-
Edition
private Edition(int value)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()Description copied from interface:ProtocolMessageEnumReturn the value's numeric value as defined in the .proto file.- Specified by:
getNumberin interfaceInternal.EnumLite- Specified by:
getNumberin interfaceProtocolMessageEnum
-
valueOf
Deprecated.Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
value- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
-
getValueDescriptor
Description copied from interface:ProtocolMessageEnumReturn the value's descriptor, which contains information such as value name, number, and type.- Specified by:
getValueDescriptorin interfaceProtocolMessageEnum
-
getDescriptorForType
Description copied from interface:ProtocolMessageEnumReturn the enum type's descriptor, which contains information about each defined value, etc.- Specified by:
getDescriptorForTypein interfaceProtocolMessageEnum
-
getDescriptor
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
desc- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-