@Generated(value="proto") public static final class Enum.Builder extends GeneratedMessageV3.Builder<Enum.Builder> implements EnumOrBuilder
Enum type definition.Protobuf type
google.protobuf.Enum
Modifier and Type | Method and Description |
---|---|
Enum.Builder |
addAllEnumvalue(java.lang.Iterable<? extends EnumValue> values)
Enum value definitions.
|
Enum.Builder |
addAllOptions(java.lang.Iterable<? extends Option> values)
Protocol buffer options.
|
Enum.Builder |
addEnumvalue(EnumValue.Builder builderForValue)
Enum value definitions.
|
Enum.Builder |
addEnumvalue(EnumValue value)
Enum value definitions.
|
Enum.Builder |
addEnumvalue(int index,
EnumValue.Builder builderForValue)
Enum value definitions.
|
Enum.Builder |
addEnumvalue(int index,
EnumValue value)
Enum value definitions.
|
EnumValue.Builder |
addEnumvalueBuilder()
Enum value definitions.
|
EnumValue.Builder |
addEnumvalueBuilder(int index)
Enum value definitions.
|
Enum.Builder |
addOptions(int index,
Option.Builder builderForValue)
Protocol buffer options.
|
Enum.Builder |
addOptions(int index,
Option value)
Protocol buffer options.
|
Enum.Builder |
addOptions(Option.Builder builderForValue)
Protocol buffer options.
|
Enum.Builder |
addOptions(Option value)
Protocol buffer options.
|
Option.Builder |
addOptionsBuilder()
Protocol buffer options.
|
Option.Builder |
addOptionsBuilder(int index)
Protocol buffer options.
|
Enum.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
java.lang.Object value)
Like
setRepeatedField , but appends the value as a new element. |
Enum |
build()
Constructs the message based on the state of the Builder.
|
Enum |
buildPartial()
Like
MessageLite.Builder.build() , but does not throw an exception if the message is missing required
fields. |
Enum.Builder |
clear()
Called by the initialization and clear code paths to allow subclasses to
reset any of their builtin fields back to the initial values.
|
Enum.Builder |
clearEnumvalue()
Enum value definitions.
|
Enum.Builder |
clearField(Descriptors.FieldDescriptor field)
Clears the field.
|
Enum.Builder |
clearName()
Enum type name.
|
Enum.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
TODO(jieluo): Clear it when all subclasses have implemented this method.
|
Enum.Builder |
clearOptions()
Protocol buffer options.
|
Enum.Builder |
clearSourceContext()
The source context.
|
Enum.Builder |
clearSyntax()
The source syntax.
|
Enum.Builder |
clone()
Clones the Builder.
|
Enum |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType()
Get the message's type's descriptor.
|
EnumValue |
getEnumvalue(int index)
Enum value definitions.
|
EnumValue.Builder |
getEnumvalueBuilder(int index)
Enum value definitions.
|
java.util.List<EnumValue.Builder> |
getEnumvalueBuilderList()
Enum value definitions.
|
int |
getEnumvalueCount()
Enum value definitions.
|
java.util.List<EnumValue> |
getEnumvalueList()
Enum value definitions.
|
EnumValueOrBuilder |
getEnumvalueOrBuilder(int index)
Enum value definitions.
|
java.util.List<? extends EnumValueOrBuilder> |
getEnumvalueOrBuilderList()
Enum value definitions.
|
java.lang.String |
getName()
Enum type name.
|
ByteString |
getNameBytes()
Enum type name.
|
Option |
getOptions(int index)
Protocol buffer options.
|
Option.Builder |
getOptionsBuilder(int index)
Protocol buffer options.
|
java.util.List<Option.Builder> |
getOptionsBuilderList()
Protocol buffer options.
|
int |
getOptionsCount()
Protocol buffer options.
|
java.util.List<Option> |
getOptionsList()
Protocol buffer options.
|
OptionOrBuilder |
getOptionsOrBuilder(int index)
Protocol buffer options.
|
java.util.List<? extends OptionOrBuilder> |
getOptionsOrBuilderList()
Protocol buffer options.
|
SourceContext |
getSourceContext()
The source context.
|
SourceContext.Builder |
getSourceContextBuilder()
The source context.
|
SourceContextOrBuilder |
getSourceContextOrBuilder()
The source context.
|
Syntax |
getSyntax()
The source syntax.
|
int |
getSyntaxValue()
The source syntax.
|
boolean |
hasSourceContext()
The source context.
|
protected GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable()
Get the FieldAccessorTable for this type.
|
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded messages are set, false
otherwise.
|
Enum.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry)
Like
MessageLite.Builder.mergeFrom(CodedInputStream) , but also parses extensions. |
Enum.Builder |
mergeFrom(Enum other) |
Enum.Builder |
mergeFrom(Message other)
Merge
other into the message being built. |
Enum.Builder |
mergeSourceContext(SourceContext value)
The source context.
|
Enum.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
Merge some unknown fields into the
UnknownFieldSet for this message. |
Enum.Builder |
removeEnumvalue(int index)
Enum value definitions.
|
Enum.Builder |
removeOptions(int index)
Protocol buffer options.
|
Enum.Builder |
setEnumvalue(int index,
EnumValue.Builder builderForValue)
Enum value definitions.
|
Enum.Builder |
setEnumvalue(int index,
EnumValue value)
Enum value definitions.
|
Enum.Builder |
setField(Descriptors.FieldDescriptor field,
java.lang.Object value)
Sets a field to the given value.
|
Enum.Builder |
setName(java.lang.String value)
Enum type name.
|
Enum.Builder |
setNameBytes(ByteString value)
Enum type name.
|
Enum.Builder |
setOptions(int index,
Option.Builder builderForValue)
Protocol buffer options.
|
Enum.Builder |
setOptions(int index,
Option value)
Protocol buffer options.
|
Enum.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
java.lang.Object value)
Sets an element of a repeated field to the given value.
|
Enum.Builder |
setSourceContext(SourceContext.Builder builderForValue)
The source context.
|
Enum.Builder |
setSourceContext(SourceContext value)
The source context.
|
Enum.Builder |
setSyntax(Syntax value)
The source syntax.
|
Enum.Builder |
setSyntaxValue(int value)
The source syntax.
|
Enum.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
Set the
UnknownFieldSet for this message. |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessageV3.Builder
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<Enum.Builder>
public Enum.Builder clear()
GeneratedMessageV3.Builder
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<Enum.Builder>
public Descriptors.Descriptor getDescriptorForType()
Message.Builder
MessageOrBuilder.getDescriptorForType()
.getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<Enum.Builder>
public Enum getDefaultInstanceForType()
MessageLiteOrBuilder
getDefaultInstance()
method of generated
message classes in that this method is an abstract method of the MessageLite
interface
whereas getDefaultInstance()
is a static method of a specific class. They return the
same thing.getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public Enum build()
MessageLite.Builder
build
in interface Message.Builder
build
in interface MessageLite.Builder
public Enum buildPartial()
MessageLite.Builder
MessageLite.Builder.build()
, but does not throw an exception if the message is missing required
fields. Instead, a partial message is returned. Subsequent changes to the Builder will not
affect the returned message.buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public Enum.Builder clone()
MessageLite.Builder
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<Enum.Builder>
Object.clone()
public Enum.Builder setField(Descriptors.FieldDescriptor field, java.lang.Object value)
Message.Builder
MessageOrBuilder.getField(Descriptors.FieldDescriptor)
would return.setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<Enum.Builder>
public Enum.Builder clearField(Descriptors.FieldDescriptor field)
Message.Builder
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<Enum.Builder>
public Enum.Builder clearOneof(Descriptors.OneofDescriptor oneof)
AbstractMessage.Builder
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<Enum.Builder>
public Enum.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, java.lang.Object value)
Message.Builder
MessageOrBuilder.getRepeatedField(Descriptors.FieldDescriptor,int)
would return.setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<Enum.Builder>
public Enum.Builder addRepeatedField(Descriptors.FieldDescriptor field, java.lang.Object value)
Message.Builder
setRepeatedField
, but appends the value as a new element.addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<Enum.Builder>
public Enum.Builder mergeFrom(Message other)
Message.Builder
other
into the message being built. other
must have the exact same type
as this
(i.e. getDescriptorForType() == other.getDescriptorForType()
).
Merging occurs as follows. For each field:
* For singular primitive fields, if the field is set in other
, then other
's
value overwrites the value in this message.
* For singular message fields, if the field is set in other
, it is merged into the
corresponding sub-message of this message using the same merging rules.
* For repeated fields, the elements in other
are concatenated with the elements in
this message.
* For oneof groups, if the other message has one of the fields set, the group of this message
is cleared and replaced by the field of the other message, so that the oneof constraint is
preserved.
This is equivalent to the Message::MergeFrom
method in C++.
mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<Enum.Builder>
public Enum.Builder mergeFrom(Enum other)
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<Enum.Builder>
public Enum.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
MessageLite.Builder
MessageLite.Builder.mergeFrom(CodedInputStream)
, but also parses extensions. The extensions
that you want to be able to parse must be registered in extensionRegistry
. Extensions
not in the registry will be treated as unknown fields.mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<Enum.Builder>
java.io.IOException
public java.lang.String getName()
Enum type name.
string name = 1;
getName
in interface EnumOrBuilder
public ByteString getNameBytes()
Enum type name.
string name = 1;
getNameBytes
in interface EnumOrBuilder
public Enum.Builder setName(java.lang.String value)
Enum type name.
string name = 1;
public Enum.Builder clearName()
Enum type name.
string name = 1;
public Enum.Builder setNameBytes(ByteString value)
Enum type name.
string name = 1;
public java.util.List<EnumValue> getEnumvalueList()
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
getEnumvalueList
in interface EnumOrBuilder
public int getEnumvalueCount()
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
getEnumvalueCount
in interface EnumOrBuilder
public EnumValue getEnumvalue(int index)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
getEnumvalue
in interface EnumOrBuilder
public Enum.Builder setEnumvalue(int index, EnumValue value)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public Enum.Builder setEnumvalue(int index, EnumValue.Builder builderForValue)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public Enum.Builder addEnumvalue(EnumValue value)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public Enum.Builder addEnumvalue(int index, EnumValue value)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public Enum.Builder addEnumvalue(EnumValue.Builder builderForValue)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public Enum.Builder addEnumvalue(int index, EnumValue.Builder builderForValue)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public Enum.Builder addAllEnumvalue(java.lang.Iterable<? extends EnumValue> values)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public Enum.Builder clearEnumvalue()
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public Enum.Builder removeEnumvalue(int index)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public EnumValue.Builder getEnumvalueBuilder(int index)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public EnumValueOrBuilder getEnumvalueOrBuilder(int index)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
getEnumvalueOrBuilder
in interface EnumOrBuilder
public java.util.List<? extends EnumValueOrBuilder> getEnumvalueOrBuilderList()
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
getEnumvalueOrBuilderList
in interface EnumOrBuilder
public EnumValue.Builder addEnumvalueBuilder()
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public EnumValue.Builder addEnumvalueBuilder(int index)
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public java.util.List<EnumValue.Builder> getEnumvalueBuilderList()
Enum value definitions.
repeated .google.protobuf.EnumValue enumvalue = 2;
public java.util.List<Option> getOptionsList()
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
getOptionsList
in interface EnumOrBuilder
public int getOptionsCount()
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
getOptionsCount
in interface EnumOrBuilder
public Option getOptions(int index)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
getOptions
in interface EnumOrBuilder
public Enum.Builder setOptions(int index, Option value)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public Enum.Builder setOptions(int index, Option.Builder builderForValue)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public Enum.Builder addOptions(Option value)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public Enum.Builder addOptions(int index, Option value)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public Enum.Builder addOptions(Option.Builder builderForValue)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public Enum.Builder addOptions(int index, Option.Builder builderForValue)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public Enum.Builder addAllOptions(java.lang.Iterable<? extends Option> values)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public Enum.Builder clearOptions()
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public Enum.Builder removeOptions(int index)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public Option.Builder getOptionsBuilder(int index)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public OptionOrBuilder getOptionsOrBuilder(int index)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
getOptionsOrBuilder
in interface EnumOrBuilder
public java.util.List<? extends OptionOrBuilder> getOptionsOrBuilderList()
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
getOptionsOrBuilderList
in interface EnumOrBuilder
public Option.Builder addOptionsBuilder()
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public Option.Builder addOptionsBuilder(int index)
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public java.util.List<Option.Builder> getOptionsBuilderList()
Protocol buffer options.
repeated .google.protobuf.Option options = 3;
public boolean hasSourceContext()
The source context.
.google.protobuf.SourceContext source_context = 4;
hasSourceContext
in interface EnumOrBuilder
public SourceContext getSourceContext()
The source context.
.google.protobuf.SourceContext source_context = 4;
getSourceContext
in interface EnumOrBuilder
public Enum.Builder setSourceContext(SourceContext value)
The source context.
.google.protobuf.SourceContext source_context = 4;
public Enum.Builder setSourceContext(SourceContext.Builder builderForValue)
The source context.
.google.protobuf.SourceContext source_context = 4;
public Enum.Builder mergeSourceContext(SourceContext value)
The source context.
.google.protobuf.SourceContext source_context = 4;
public Enum.Builder clearSourceContext()
The source context.
.google.protobuf.SourceContext source_context = 4;
public SourceContext.Builder getSourceContextBuilder()
The source context.
.google.protobuf.SourceContext source_context = 4;
public SourceContextOrBuilder getSourceContextOrBuilder()
The source context.
.google.protobuf.SourceContext source_context = 4;
getSourceContextOrBuilder
in interface EnumOrBuilder
public int getSyntaxValue()
The source syntax.
.google.protobuf.Syntax syntax = 5;
getSyntaxValue
in interface EnumOrBuilder
public Enum.Builder setSyntaxValue(int value)
The source syntax.
.google.protobuf.Syntax syntax = 5;
public Syntax getSyntax()
The source syntax.
.google.protobuf.Syntax syntax = 5;
getSyntax
in interface EnumOrBuilder
public Enum.Builder setSyntax(Syntax value)
The source syntax.
.google.protobuf.Syntax syntax = 5;
public Enum.Builder clearSyntax()
The source syntax.
.google.protobuf.Syntax syntax = 5;
public final Enum.Builder setUnknownFields(UnknownFieldSet unknownFields)
Message.Builder
UnknownFieldSet
for this message.setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<Enum.Builder>
public final Enum.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Message.Builder
UnknownFieldSet
for this message.mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<Enum.Builder>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.