Class DescriptorProtos.OneofOptions.Builder (3.19.4)

publicstaticfinalclass DescriptorProtos.OneofOptions.BuilderextendsGeneratedMessageV3.ExtendableBuilder<DescriptorProtos.OneofOptions,DescriptorProtos.OneofOptions.Builder>implementsDescriptorProtos.OneofOptionsOrBuilder

Protobuf type google.protobuf.OneofOptions

Inherited Members

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptors.Descriptor

Methods

<Type>addExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.OneofOptions,List<Type>> extension, Type value)

publicDescriptorProtos.OneofOptions.Builder<Type>addExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.OneofOptions,List<Type>>extension,Typevalue)

Append a value to a repeated extension.

Parameters
Name Description
extension GeneratedExtension<OneofOptions,List<Type>>
value Type
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

<Type>clearExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.OneofOptions,?> extension)

publicDescriptorProtos.OneofOptions.Builder<Type>clearExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.OneofOptions,?>extension)

Clear an extension.

Parameter
Name Description
extension GeneratedExtension<OneofOptions,?>
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

<Type>setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.OneofOptions,Type> extension, Type value)

publicDescriptorProtos.OneofOptions.Builder<Type>setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.OneofOptions,Type>extension,Typevalue)

Set the value of an extension.

Parameters
Name Description
extension GeneratedExtension<OneofOptions,Type>
value Type
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

<Type>setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.OneofOptions,List<Type>> extension, int index, Type value)

publicDescriptorProtos.OneofOptions.Builder<Type>setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.OneofOptions,List<Type>>extension,intindex,Typevalue)

Set the value of one element of a repeated extension.

Parameters
Name Description
extension GeneratedExtension<OneofOptions,List<Type>>
index int
value Type
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

addAllUninterpretedOption(Iterable<? extends DescriptorProtos.UninterpretedOption> values)

publicDescriptorProtos.OneofOptions.BuilderaddAllUninterpretedOption(Iterable<?extendsDescriptorProtos.UninterpretedOption>values)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
Name Description
values Iterable<? extends com.google.protobuf.DescriptorProtos.UninterpretedOption>
Returns
Type Description
DescriptorProtos.OneofOptions.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicDescriptorProtos.OneofOptions.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field Descriptors.FieldDescriptor
value Object
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

addUninterpretedOption(DescriptorProtos.UninterpretedOption value)

publicDescriptorProtos.OneofOptions.BuilderaddUninterpretedOption(DescriptorProtos.UninterpretedOptionvalue)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
Name Description
value DescriptorProtos.UninterpretedOption
Returns
Type Description
DescriptorProtos.OneofOptions.Builder

addUninterpretedOption(DescriptorProtos.UninterpretedOption.Builder builderForValue)

publicDescriptorProtos.OneofOptions.BuilderaddUninterpretedOption(DescriptorProtos.UninterpretedOption.BuilderbuilderForValue)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
Name Description
builderForValue DescriptorProtos.UninterpretedOption.Builder
Returns
Type Description
DescriptorProtos.OneofOptions.Builder

addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)

publicDescriptorProtos.OneofOptions.BuilderaddUninterpretedOption(intindex,DescriptorProtos.UninterpretedOptionvalue)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameters
Name Description
index int
value DescriptorProtos.UninterpretedOption
Returns
Type Description
DescriptorProtos.OneofOptions.Builder

addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)

publicDescriptorProtos.OneofOptions.BuilderaddUninterpretedOption(intindex,DescriptorProtos.UninterpretedOption.BuilderbuilderForValue)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameters
Name Description
index int
builderForValue DescriptorProtos.UninterpretedOption.Builder
Returns
Type Description
DescriptorProtos.OneofOptions.Builder

addUninterpretedOptionBuilder()

publicDescriptorProtos.UninterpretedOption.BuilderaddUninterpretedOptionBuilder()

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
Type Description
DescriptorProtos.UninterpretedOption.Builder

addUninterpretedOptionBuilder(int index)

publicDescriptorProtos.UninterpretedOption.BuilderaddUninterpretedOptionBuilder(intindex)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
Name Description
index int
Returns
Type Description
DescriptorProtos.UninterpretedOption.Builder

build()

publicDescriptorProtos.OneofOptionsbuild()
Returns
Type Description
DescriptorProtos.OneofOptions

buildPartial()

publicDescriptorProtos.OneofOptionsbuildPartial()
Returns
Type Description
DescriptorProtos.OneofOptions

clear()

publicDescriptorProtos.OneofOptions.Builderclear()

Called by the initialization and clear code paths to allow subclasses to reset any of their builtin fields back to the initial values.

Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

publicDescriptorProtos.OneofOptions.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field Descriptors.FieldDescriptor
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

publicDescriptorProtos.OneofOptions.BuilderclearOneof(Descriptors.OneofDescriptoroneof)

TODO(jieluo): Clear it when all subclasses have implemented this method.

Parameter
Name Description
oneof Descriptors.OneofDescriptor
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

clearUninterpretedOption()

publicDescriptorProtos.OneofOptions.BuilderclearUninterpretedOption()

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
Type Description
DescriptorProtos.OneofOptions.Builder

clone()

publicDescriptorProtos.OneofOptions.Builderclone()

Clones the Builder.

Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

getDefaultInstanceForType()

publicDescriptorProtos.OneofOptionsgetDefaultInstanceForType()

Get an instance of the type with no fields set. Because no fields are set, all getters for singular fields will return default values and repeated fields will appear empty. This may or may not be a singleton. This differs from the 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.

Returns
Type Description
DescriptorProtos.OneofOptions

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()

Get the message's type's descriptor. This differs from the getDescriptor() method of generated message classes in that this method is an abstract method of the Message interface whereas getDescriptor() is a static method of a specific class. They return the same thing.

Returns
Type Description
Descriptors.Descriptor
Overrides

getUninterpretedOption(int index)

publicDescriptorProtos.UninterpretedOptiongetUninterpretedOption(intindex)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
Name Description
index int
Returns
Type Description
DescriptorProtos.UninterpretedOption

getUninterpretedOptionBuilder(int index)

publicDescriptorProtos.UninterpretedOption.BuildergetUninterpretedOptionBuilder(intindex)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
Name Description
index int
Returns
Type Description
DescriptorProtos.UninterpretedOption.Builder

getUninterpretedOptionBuilderList()

publicList<DescriptorProtos.UninterpretedOption.Builder>getUninterpretedOptionBuilderList()

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
Type Description
List<Builder>

getUninterpretedOptionCount()

publicintgetUninterpretedOptionCount()

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
Type Description
int

getUninterpretedOptionList()

publicList<DescriptorProtos.UninterpretedOption>getUninterpretedOptionList()

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
Type Description
List<UninterpretedOption>

getUninterpretedOptionOrBuilder(int index)

publicDescriptorProtos.UninterpretedOptionOrBuildergetUninterpretedOptionOrBuilder(intindex)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
Name Description
index int
Returns
Type Description
DescriptorProtos.UninterpretedOptionOrBuilder

getUninterpretedOptionOrBuilderList()

publicList<?extendsDescriptorProtos.UninterpretedOptionOrBuilder>getUninterpretedOptionOrBuilderList()

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Returns
Type Description
List<? extends com.google.protobuf.DescriptorProtos.UninterpretedOptionOrBuilder>

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()

Get the FieldAccessorTable for this type. We can't have the message class pass this in to the constructor because of bootstrapping trouble with DescriptorProtos.

Returns
Type Description
GeneratedMessageV3.FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()

Returns true if all required fields in the message and all embedded messages are set, false otherwise.

See also: MessageOrBuilder#getInitializationErrorString()

Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicDescriptorProtos.OneofOptions.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)

Like 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.

Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(DescriptorProtos.OneofOptions other)

publicDescriptorProtos.OneofOptions.BuildermergeFrom(DescriptorProtos.OneofOptionsother)
Parameter
Name Description
other DescriptorProtos.OneofOptions
Returns
Type Description
DescriptorProtos.OneofOptions.Builder

mergeFrom(Message other)

publicDescriptorProtos.OneofOptions.BuildermergeFrom(Messageother)

Merge 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++.

Parameter
Name Description
other Message
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalDescriptorProtos.OneofOptions.BuildermergeUnknownFields(UnknownFieldSetunknownFields)

Merge some unknown fields into the UnknownFieldSet for this message.

Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

removeUninterpretedOption(int index)

publicDescriptorProtos.OneofOptions.BuilderremoveUninterpretedOption(intindex)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameter
Name Description
index int
Returns
Type Description
DescriptorProtos.OneofOptions.Builder

setField(Descriptors.FieldDescriptor field, Object value)

publicDescriptorProtos.OneofOptions.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field Descriptors.FieldDescriptor
value Object
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicDescriptorProtos.OneofOptions.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field Descriptors.FieldDescriptor
index int
value Object
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)

publicDescriptorProtos.OneofOptions.BuildersetUninterpretedOption(intindex,DescriptorProtos.UninterpretedOptionvalue)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameters
Name Description
index int
value DescriptorProtos.UninterpretedOption
Returns
Type Description
DescriptorProtos.OneofOptions.Builder

setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)

publicDescriptorProtos.OneofOptions.BuildersetUninterpretedOption(intindex,DescriptorProtos.UninterpretedOption.BuilderbuilderForValue)

The parser stores options it doesn't recognize here. See above.

repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;

Parameters
Name Description
index int
builderForValue DescriptorProtos.UninterpretedOption.Builder
Returns
Type Description
DescriptorProtos.OneofOptions.Builder

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalDescriptorProtos.OneofOptions.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DescriptorProtos.OneofOptions.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.