Class DescriptorProtos.UninterpretedOption.NamePart.Builder (3.19.4)

public static final class DescriptorProtos.UninterpretedOption.NamePart.Builder extends GeneratedMessageV3.Builder<DescriptorProtos.UninterpretedOption.NamePart.Builder> implements DescriptorProtos.UninterpretedOption.NamePartOrBuilder

The name of the uninterpreted option. Each string represents a segment in a dot-separated name. is_extension is true iff a segment represents an extension (denoted with parentheses in options specs in .proto files). E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents "foo.(bar.baz).qux".

Protobuf type google.protobuf.UninterpretedOption.NamePart

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptors.Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DescriptorProtos.UninterpretedOption.NamePart.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field Descriptors.FieldDescriptor
value Object
Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder
Overrides

build()

public DescriptorProtos.UninterpretedOption.NamePart build()
Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart

buildPartial()

public DescriptorProtos.UninterpretedOption.NamePart buildPartial()
Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart

clear()

public DescriptorProtos.UninterpretedOption.NamePart.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.

Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public DescriptorProtos.UninterpretedOption.NamePart.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field Descriptors.FieldDescriptor
Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder
Overrides

clearIsExtension()

public DescriptorProtos.UninterpretedOption.NamePart.Builder clearIsExtension()

required bool is_extension = 2;

Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder

This builder for chaining.

clearNamePart()

public DescriptorProtos.UninterpretedOption.NamePart.Builder clearNamePart()

required string name_part = 1;

Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public DescriptorProtos.UninterpretedOption.NamePart.Builder clearOneof(Descriptors.OneofDescriptor oneof)

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

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

clone()

public DescriptorProtos.UninterpretedOption.NamePart.Builder clone()

Clones the Builder.

Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder
Overrides

getDefaultInstanceForType()

public DescriptorProtos.UninterpretedOption.NamePart getDefaultInstanceForType()

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.UninterpretedOption.NamePart

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()

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

getIsExtension()

public boolean getIsExtension()

required bool is_extension = 2;

Returns
Type Description
boolean

The isExtension.

getNamePart()

public String getNamePart()

required string name_part = 1;

Returns
Type Description
String

The namePart.

getNamePartBytes()

public ByteString getNamePartBytes()

required string name_part = 1;

Returns
Type Description
ByteString

The bytes for namePart.

hasIsExtension()

public boolean hasIsExtension()

required bool is_extension = 2;

Returns
Type Description
boolean

Whether the isExtension field is set.

hasNamePart()

public boolean hasNamePart()

required string name_part = 1;

Returns
Type Description
boolean

Whether the namePart field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()

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()

public final boolean isInitialized()

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)

public DescriptorProtos.UninterpretedOption.NamePart.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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.UninterpretedOption.NamePart.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(DescriptorProtos.UninterpretedOption.NamePart other)

public DescriptorProtos.UninterpretedOption.NamePart.Builder mergeFrom(DescriptorProtos.UninterpretedOption.NamePart other)
Parameter
Name Description
other DescriptorProtos.UninterpretedOption.NamePart
Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder

mergeFrom(Message other)

public DescriptorProtos.UninterpretedOption.NamePart.Builder mergeFrom(Message other)

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.UninterpretedOption.NamePart.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DescriptorProtos.UninterpretedOption.NamePart.Builder mergeUnknownFields(UnknownFieldSet unknownFields)

Merge some unknown fields into the UnknownFieldSet for this message.

Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public DescriptorProtos.UninterpretedOption.NamePart.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field Descriptors.FieldDescriptor
value Object
Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder
Overrides

setIsExtension(boolean value)

public DescriptorProtos.UninterpretedOption.NamePart.Builder setIsExtension(boolean value)

required bool is_extension = 2;

Parameter
Name Description
value boolean

The isExtension to set.

Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder

This builder for chaining.

setNamePart(String value)

public DescriptorProtos.UninterpretedOption.NamePart.Builder setNamePart(String value)

required string name_part = 1;

Parameter
Name Description
value String

The namePart to set.

Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder

This builder for chaining.

setNamePartBytes(ByteString value)

public DescriptorProtos.UninterpretedOption.NamePart.Builder setNamePartBytes(ByteString value)

required string name_part = 1;

Parameter
Name Description
value ByteString

The bytes for namePart to set.

Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder

This builder for chaining.

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

public DescriptorProtos.UninterpretedOption.NamePart.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field Descriptors.FieldDescriptor
index int
value Object
Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final DescriptorProtos.UninterpretedOption.NamePart.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
DescriptorProtos.UninterpretedOption.NamePart.Builder
Overrides