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:
com.google.protobuf.Internal.EnumLite,Serializable,Comparable<DescriptorProtos.FieldOptions.OptionRetention>,java.lang.constant.Constable
- Enclosing class:
- DescriptorProtos.FieldOptions
public static enum DescriptorProtos.FieldOptions.OptionRetention
extends Enum<DescriptorProtos.FieldOptions.OptionRetention>
implements com.google.protobuf.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 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 TypeFieldDescriptionstatic final intRETENTION_RUNTIME = 1;static final intRETENTION_SOURCE = 2;static final intRETENTION_UNKNOWN = 0; -
Method Summary
Modifier and TypeMethodDescriptionforNumber(int value) final intstatic com.google.protobuf.Internal.EnumLiteMap<DescriptorProtos.FieldOptions.OptionRetention>static com.google.protobuf.Internal.EnumVerifiervalueOf(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:
-
-
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:
getNumberin interfacecom.google.protobuf.Internal.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 com.google.protobuf.Internal.EnumLiteMap<DescriptorProtos.FieldOptions.OptionRetention> internalGetValueMap() -
internalGetVerifier
public static com.google.protobuf.Internal.EnumVerifier internalGetVerifier()
-