Package com.google.protobuf
Class Enum
java.lang.Object
com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
- 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 intprivate static final Enumprivate Stringstatic final intprivate Internal.ProtobufList<EnumValue>static final intprivate Stringstatic final intprivate Internal.ProtobufList<Option>static final intstatic final intprivate SourceContextprivate intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageLite
UNINITIALIZED_HASH_CODE, UNINITIALIZED_SERIALIZED_SIZE, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddAllEnumvalue(Iterable<? extends EnumValue> values) Enum value definitions.private voidaddAllOptions(Iterable<? extends Option> values) Protocol buffer options.private voidaddEnumvalue(int index, EnumValue value) Enum value definitions.private voidaddEnumvalue(EnumValue value) Enum value definitions.private voidaddOptions(int index, Option value) Protocol buffer options.private voidaddOptions(Option value) Protocol buffer options.private voidThe source edition string, only valid when syntax is SYNTAX_EDITIONS.private voidEnum value definitions.private voidEnum type name.private voidProtocol buffer options.private voidThe source context.private voidThe source syntax.protected final ObjectdynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) A method that implements different types of operations described inGeneratedMessageLite.MethodToInvoke.private voidprivate voidstatic EnumThe 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.intEnum 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.intProtocol buffer options.Protocol buffer options.getOptionsOrBuilder(int index) Protocol buffer options.List<? extends OptionOrBuilder>Protocol buffer options.The source context.The source syntax.intThe source syntax.booleanThe source context.private voidmergeSourceContext(SourceContext value) The source context.static Enum.Builderstatic Enum.BuildernewBuilder(Enum prototype) static EnumparseDelimitedFrom(InputStream input) static EnumparseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static EnumparseFrom(byte[] data) static EnumparseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) static EnumparseFrom(ByteString data) static EnumparseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) static EnumparseFrom(CodedInputStream input) static EnumparseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) static EnumparseFrom(InputStream input) static EnumparseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) static EnumparseFrom(ByteBuffer data) static EnumparseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) parser()private voidremoveEnumvalue(int index) Enum value definitions.private voidremoveOptions(int index) Protocol buffer options.private voidsetEdition(String value) The source edition string, only valid when syntax is SYNTAX_EDITIONS.private voidsetEditionBytes(ByteString value) The source edition string, only valid when syntax is SYNTAX_EDITIONS.private voidsetEnumvalue(int index, EnumValue value) Enum value definitions.private voidEnum type name.private voidsetNameBytes(ByteString value) Enum type name.private voidsetOptions(int index, Option value) Protocol buffer options.private voidsetSourceContext(SourceContext value) The source context.private voidThe source syntax.private voidsetSyntaxValue(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, writeToMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, newUninitializedMessageException, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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:
getNamein interfaceEnumOrBuilder- Returns:
- The name.
-
getNameBytes
Enum type name.
string name = 1;- Specified by:
getNameBytesin 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:
getEnumvalueListin 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:
getEnumvalueCountin interfaceEnumOrBuilder
-
getEnumvalue
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;- Specified by:
getEnumvaluein 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:
getOptionsListin 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:
getOptionsCountin interfaceEnumOrBuilder
-
getOptions
Protocol buffer options.
repeated .google.protobuf.Option options = 3;- Specified by:
getOptionsin 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:
hasSourceContextin interfaceEnumOrBuilder- Returns:
- Whether the sourceContext field is set.
-
getSourceContext
The source context.
.google.protobuf.SourceContext source_context = 4;- Specified by:
getSourceContextin 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:
getSyntaxValuein interfaceEnumOrBuilder- Returns:
- The enum numeric value on the wire for syntax.
-
getSyntax
The source syntax.
.google.protobuf.Syntax syntax = 5;- Specified by:
getSyntaxin 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:
getEditionin interfaceEnumOrBuilder- Returns:
- The edition.
-
getEditionBytes
The source edition string, only valid when syntax is SYNTAX_EDITIONS.
string edition = 6;- Specified by:
getEditionBytesin 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:GeneratedMessageLiteA 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_INSTANCEreturns a new instance of the protocol buffer that has not yet been made immutable. SeeMAKE_IMMUTABLE.IS_INITIALIZEDreturnsnullfor false and the default instance for true. It doesn't use or modify any memoized value.GET_MEMOIZED_IS_INITIALIZEDreturns the memoizedisInitializedbyte value.SET_MEMOIZED_IS_INITIALIZEDsets the memoizedisInitializedbyte value to 1 if the first parameter is not null, or to 0 if the first parameter is null.NEW_BUILDERreturns aBuilderTypeinstance.
For use by generated code only.
- Specified by:
dynamicMethodin classGeneratedMessageLite<Enum,Enum.Builder>
-
getDefaultInstance
-
parser
-