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_2024 = 1001;
EDITION_99997_TEST_ONLY = 99997;
EDITION_99998_TEST_ONLY = 99998;
EDITION_99999_TEST_ONLY = 99999;
A placeholder edition for specifying default behaviors *before* a feature was first introduced.Placeholder for specifying unbounded edition support.Legacy syntax "editions".EDITION_PROTO3 = 999;
A placeholder for an unknown edition value. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Placeholder editions for testing feature resolution.static final int
EDITION_2_TEST_ONLY = 2;
static final int
Editions that have been released.static final int
EDITION_2024 = 1001;
static final int
EDITION_99997_TEST_ONLY = 99997;
static final int
EDITION_99998_TEST_ONLY = 99998;
static final int
EDITION_99999_TEST_ONLY = 99999;
static final int
A placeholder edition for specifying default behaviors *before* a feature was first introduced.static final int
Placeholder for specifying unbounded edition support.static final int
Legacy syntax "editions".static final int
EDITION_PROTO3 = 999;
static final int
A placeholder for an unknown edition value.private static final Internal.EnumLiteMap
<DescriptorProtos.Edition> private final int
private static final DescriptorProtos.Edition[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DescriptorProtos.Edition
forNumber
(int value) static final Descriptors.EnumDescriptor
Return the enum type's descriptor, which contains information about each defined value, etc.final int
Return 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.Edition
valueOf
(int value) Deprecated.static DescriptorProtos.Edition
Returns the enum constant of this class with the specified name.static DescriptorProtos.Edition
Returns 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_LEGACY
A placeholder edition for specifying default behaviors *before* a feature was first introduced. This is effectively an "infinite past".
EDITION_LEGACY = 900;
-
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_2024
EDITION_2024 = 1001;
-
EDITION_1_TEST_ONLY
Placeholder editions for testing feature resolution. These should not be used or relied 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;
-
EDITION_MAX
Placeholder for specifying unbounded edition support. This should only ever be used by plugins that can expect to never require any changes to support a new edition.
EDITION_MAX = 2147483647;
-
-
Field Details
-
EDITION_UNKNOWN_VALUE
public static final int EDITION_UNKNOWN_VALUEA placeholder for an unknown edition value.
EDITION_UNKNOWN = 0;
- See Also:
-
EDITION_LEGACY_VALUE
public static final int EDITION_LEGACY_VALUEA placeholder edition for specifying default behaviors *before* a feature was first introduced. This is effectively an "infinite past".
EDITION_LEGACY = 900;
- 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_2024_VALUE
public static final int EDITION_2024_VALUEEDITION_2024 = 1001;
- 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 relied 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:
-
EDITION_MAX_VALUE
public static final int EDITION_MAX_VALUEPlaceholder for specifying unbounded edition support. This should only ever be used by plugins that can expect to never require any changes to support a new edition.
EDITION_MAX = 2147483647;
- 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:ProtocolMessageEnum
Return the value's numeric value as defined in the .proto file.- Specified by:
getNumber
in interfaceInternal.EnumLite
- Specified by:
getNumber
in 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:ProtocolMessageEnum
Return the value's descriptor, which contains information such as value name, number, and type.- Specified by:
getValueDescriptor
in interfaceProtocolMessageEnum
-
getDescriptorForType
Description copied from interface:ProtocolMessageEnum
Return the enum type's descriptor, which contains information about each defined value, etc.- Specified by:
getDescriptorForType
in 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
-