Package com.google.protobuf
Class Enum
- All Implemented Interfaces:
EnumOrBuilder
,MessageLite
,MessageLiteOrBuilder
Enum type definition.Protobuf type
google.protobuf.Enum
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
GeneratedMessageLite.DefaultInstanceBasedParser<T extends GeneratedMessageLite<T,
?>>, GeneratedMessageLite.ExtendableBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, GeneratedMessageLite.ExtendableMessage<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, GeneratedMessageLite.ExtensionDescriptor, GeneratedMessageLite.GeneratedExtension<ContainingType extends MessageLite, Type>, GeneratedMessageLite.MethodToInvoke, GeneratedMessageLite.SerializedForm Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
AbstractMessageLite.InternalOneOfEnum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private static final Enum
private String
static final int
private Internal.ProtobufList
<EnumValue> static final int
private String
static final int
private Internal.ProtobufList
<Option> static final int
static final int
private SourceContext
private int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessageLite
UNINITIALIZED_HASH_CODE, UNINITIALIZED_SERIALIZED_SIZE, unknownFields
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addAllEnumvalue
(Iterable<? extends EnumValue> values) Enum value definitions.private void
addAllOptions
(Iterable<? extends Option> values) Protocol buffer options.private void
addEnumvalue
(int index, EnumValue value) Enum value definitions.private void
addEnumvalue
(EnumValue value) Enum value definitions.private void
addOptions
(int index, Option value) Protocol buffer options.private void
addOptions
(Option value) Protocol buffer options.private void
The source edition string, only valid when syntax is SYNTAX_EDITIONS.private void
Enum value definitions.private void
Enum type name.private void
Protocol buffer options.private void
The source context.private void
The source syntax.protected final Object
dynamicMethod
(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) A method that implements different types of operations described inGeneratedMessageLite.MethodToInvoke
.private void
private void
static Enum
The source edition string, only valid when syntax is SYNTAX_EDITIONS.The source edition string, only valid when syntax is SYNTAX_EDITIONS.getEnumvalue
(int index) Enum value definitions.int
Enum value definitions.Enum value definitions.getEnumvalueOrBuilder
(int index) Enum value definitions.List
<? extends EnumValueOrBuilder> Enum value definitions.getName()
Enum type name.Enum type name.getOptions
(int index) Protocol buffer options.int
Protocol buffer options.Protocol buffer options.getOptionsOrBuilder
(int index) Protocol buffer options.List
<? extends OptionOrBuilder> Protocol buffer options.The source context.The source syntax.int
The source syntax.boolean
The source context.private void
mergeSourceContext
(SourceContext value) The source context.static Enum.Builder
static Enum.Builder
newBuilder
(Enum prototype) static Enum
parseDelimitedFrom
(InputStream input) static Enum
parseDelimitedFrom
(InputStream input, ExtensionRegistryLite extensionRegistry) static Enum
parseFrom
(byte[] data) static Enum
parseFrom
(byte[] data, ExtensionRegistryLite extensionRegistry) static Enum
parseFrom
(ByteString data) static Enum
parseFrom
(ByteString data, ExtensionRegistryLite extensionRegistry) static Enum
parseFrom
(CodedInputStream input) static Enum
parseFrom
(CodedInputStream input, ExtensionRegistryLite extensionRegistry) static Enum
parseFrom
(InputStream input) static Enum
parseFrom
(InputStream input, ExtensionRegistryLite extensionRegistry) static Enum
parseFrom
(ByteBuffer data) static Enum
parseFrom
(ByteBuffer data, ExtensionRegistryLite extensionRegistry) parser()
private void
removeEnumvalue
(int index) Enum value definitions.private void
removeOptions
(int index) Protocol buffer options.private void
setEdition
(String value) The source edition string, only valid when syntax is SYNTAX_EDITIONS.private void
setEditionBytes
(ByteString value) The source edition string, only valid when syntax is SYNTAX_EDITIONS.private void
setEnumvalue
(int index, EnumValue value) Enum value definitions.private void
Enum type name.private void
setNameBytes
(ByteString value) Enum type name.private void
setOptions
(int index, Option value) Protocol buffer options.private void
setSourceContext
(SourceContext value) The source context.private void
The source syntax.private void
setSyntaxValue
(int value) The source syntax.Methods inherited from class com.google.protobuf.GeneratedMessageLite
buildMessageInfo, clearMemoizedHashCode, clearMemoizedSerializedSize, computeHashCode, createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstance, getDefaultInstanceForType, getMemoizedHashCode, getMemoizedSerializedSize, getMethodOrDie, getParserForType, getSerializedSize, getSerializedSize, hashCode, hashCodeIsNotMemoized, invokeOrDie, isInitialized, isInitialized, isMutable, makeImmutable, markImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newMutableInstance, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, setMemoizedHashCode, setMemoizedSerializedSize, toBuilder, toString, writeTo
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, newUninitializedMessageException, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Field Details
-
bitField0_
private int bitField0_ -
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER- See Also:
-
name_
-
ENUMVALUE_FIELD_NUMBER
public static final int ENUMVALUE_FIELD_NUMBER- See Also:
-
enumvalue_
-
OPTIONS_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER- See Also:
-
options_
-
SOURCE_CONTEXT_FIELD_NUMBER
public static final int SOURCE_CONTEXT_FIELD_NUMBER- See Also:
-
sourceContext_
-
SYNTAX_FIELD_NUMBER
public static final int SYNTAX_FIELD_NUMBER- See Also:
-
syntax_
private int syntax_ -
EDITION_FIELD_NUMBER
public static final int EDITION_FIELD_NUMBER- See Also:
-
edition_
-
DEFAULT_INSTANCE
-
PARSER
-
-
Constructor Details
-
Enum
private Enum()
-
-
Method Details
-
getName
Enum type name.
string name = 1;
- Specified by:
getName
in interfaceEnumOrBuilder
- Returns:
- The name.
-
getNameBytes
Enum type name.
string name = 1;
- Specified by:
getNameBytes
in interfaceEnumOrBuilder
- Returns:
- The bytes for name.
-
setName
Enum type name.
string name = 1;
- Parameters:
value
- The name to set.
-
clearName
private void clearName()Enum type name.
string name = 1;
-
setNameBytes
Enum type name.
string name = 1;
- Parameters:
value
- The bytes for name to set.
-
getEnumvalueList
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
- Specified by:
getEnumvalueList
in interfaceEnumOrBuilder
-
getEnumvalueOrBuilderList
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
getEnumvalueCount
public int getEnumvalueCount()Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
- Specified by:
getEnumvalueCount
in interfaceEnumOrBuilder
-
getEnumvalue
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
- Specified by:
getEnumvalue
in interfaceEnumOrBuilder
-
getEnumvalueOrBuilder
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
ensureEnumvalueIsMutable
private void ensureEnumvalueIsMutable() -
setEnumvalue
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
addEnumvalue
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
addEnumvalue
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
addAllEnumvalue
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
clearEnumvalue
private void clearEnumvalue()Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
removeEnumvalue
private void removeEnumvalue(int index) Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
-
getOptionsList
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
- Specified by:
getOptionsList
in interfaceEnumOrBuilder
-
getOptionsOrBuilderList
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
getOptionsCount
public int getOptionsCount()Protocol buffer options.
repeated .google.protobuf.Option options = 3;
- Specified by:
getOptionsCount
in interfaceEnumOrBuilder
-
getOptions
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
- Specified by:
getOptions
in interfaceEnumOrBuilder
-
getOptionsOrBuilder
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
ensureOptionsIsMutable
private void ensureOptionsIsMutable() -
setOptions
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
addOptions
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
addOptions
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
addAllOptions
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
clearOptions
private void clearOptions()Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
removeOptions
private void removeOptions(int index) Protocol buffer options.
repeated .google.protobuf.Option options = 3;
-
hasSourceContext
public boolean hasSourceContext()The source context.
.google.protobuf.SourceContext source_context = 4;
- Specified by:
hasSourceContext
in interfaceEnumOrBuilder
- Returns:
- Whether the sourceContext field is set.
-
getSourceContext
The source context.
.google.protobuf.SourceContext source_context = 4;
- Specified by:
getSourceContext
in interfaceEnumOrBuilder
- Returns:
- The sourceContext.
-
setSourceContext
The source context.
.google.protobuf.SourceContext source_context = 4;
-
mergeSourceContext
The source context.
.google.protobuf.SourceContext source_context = 4;
-
clearSourceContext
private void clearSourceContext()The source context.
.google.protobuf.SourceContext source_context = 4;
-
getSyntaxValue
public int getSyntaxValue()The source syntax.
.google.protobuf.Syntax syntax = 5;
- Specified by:
getSyntaxValue
in interfaceEnumOrBuilder
- Returns:
- The enum numeric value on the wire for syntax.
-
getSyntax
The source syntax.
.google.protobuf.Syntax syntax = 5;
- Specified by:
getSyntax
in interfaceEnumOrBuilder
- Returns:
- The syntax.
-
setSyntaxValue
private void setSyntaxValue(int value) The source syntax.
.google.protobuf.Syntax syntax = 5;
- Parameters:
value
- The enum numeric value on the wire for syntax to set.
-
setSyntax
The source syntax.
.google.protobuf.Syntax syntax = 5;
- Parameters:
value
- The syntax to set.
-
clearSyntax
private void clearSyntax()The source syntax.
.google.protobuf.Syntax syntax = 5;
-
getEdition
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 6;
- Specified by:
getEdition
in interfaceEnumOrBuilder
- Returns:
- The edition.
-
getEditionBytes
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 6;
- Specified by:
getEditionBytes
in interfaceEnumOrBuilder
- Returns:
- The bytes for edition.
-
setEdition
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 6;
- Parameters:
value
- The edition to set.
-
clearEdition
private void clearEdition()The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 6;
-
setEditionBytes
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 6;
- Parameters:
value
- The bytes for edition to set.
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Enum parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Enum parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
InvalidProtocolBufferException
-
parseFrom
public static Enum parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Enum parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Enum parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Enum parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) Description copied from class:GeneratedMessageLite
A method that implements different types of operations described inGeneratedMessageLite.MethodToInvoke
. These different kinds of operations are required to implement message-level operations for builders in the runtime. This method bundles those operations to reduce the generated methods count.NEW_INSTANCE
returns a new instance of the protocol buffer that has not yet been made immutable. SeeMAKE_IMMUTABLE
.IS_INITIALIZED
returnsnull
for false and the default instance for true. It doesn't use or modify any memoized value.GET_MEMOIZED_IS_INITIALIZED
returns the memoizedisInitialized
byte value.SET_MEMOIZED_IS_INITIALIZED
sets the memoizedisInitialized
byte value to 1 if the first parameter is not null, or to 0 if the first parameter is null.NEW_BUILDER
returns aBuilderType
instance.
For use by generated code only.
- Specified by:
dynamicMethod
in classGeneratedMessageLite<Enum,
Enum.Builder>
-
getDefaultInstance
-
parser
-