Package com.google.protobuf
Enum Class DescriptorProtos.FieldOptions.OptionRetention
java.lang.Object
java.lang.Enum<DescriptorProtos.FieldOptions.OptionRetention>
com.google.protobuf.DescriptorProtos.FieldOptions.OptionRetention
- All Implemented Interfaces:
Internal.EnumLite
,Serializable
,Comparable<DescriptorProtos.FieldOptions.OptionRetention>
,Constable
- Enclosing class:
DescriptorProtos.FieldOptions
public static enum DescriptorProtos.FieldOptions.OptionRetention
extends Enum<DescriptorProtos.FieldOptions.OptionRetention>
implements Internal.EnumLite
If set to RETENTION_SOURCE, the option will be omitted from the binary. Note: as of January 2023, support for this is in progress and does not yet have an effect (b/264593489).Protobuf enum
google.protobuf.FieldOptions.OptionRetention
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRETENTION_RUNTIME = 1;
RETENTION_SOURCE = 2;
RETENTION_UNKNOWN = 0;
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Internal.EnumLiteMap
<DescriptorProtos.FieldOptions.OptionRetention> static final int
RETENTION_RUNTIME = 1;
static final int
RETENTION_SOURCE = 2;
static final int
RETENTION_UNKNOWN = 0;
private final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionforNumber
(int value) final int
static Internal.EnumVerifier
valueOf
(int value) Deprecated.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RETENTION_UNKNOWN
RETENTION_UNKNOWN = 0;
-
RETENTION_RUNTIME
RETENTION_RUNTIME = 1;
-
RETENTION_SOURCE
RETENTION_SOURCE = 2;
-
-
Field Details
-
RETENTION_UNKNOWN_VALUE
public static final int RETENTION_UNKNOWN_VALUERETENTION_UNKNOWN = 0;
- See Also:
-
RETENTION_RUNTIME_VALUE
public static final int RETENTION_RUNTIME_VALUERETENTION_RUNTIME = 1;
- See Also:
-
RETENTION_SOURCE_VALUE
public static final int RETENTION_SOURCE_VALUERETENTION_SOURCE = 2;
- See Also:
-
internalValueMap
private static final Internal.EnumLiteMap<DescriptorProtos.FieldOptions.OptionRetention> internalValueMap -
value
private final int value
-
-
Constructor Details
-
OptionRetention
private OptionRetention(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()- Specified by:
getNumber
in interfaceInternal.EnumLite
-
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
-
internalGetValueMap
public static Internal.EnumLiteMap<DescriptorProtos.FieldOptions.OptionRetention> internalGetValueMap() -
internalGetVerifier
-