Class DescriptorProtos.UninterpretedOption.Builder (3.19.4)

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

A message representing a option the parser does not recognize. This only appears in options protos created by the compiler::Parser class. DescriptorPool resolves these when building Descriptor objects. Therefore, options protos in descriptor objects (e.g. returned by Descriptor::options(), or produced by Descriptor::CopyTo()) will never have UninterpretedOptions in them.

Protobuf type google.protobuf.UninterpretedOption

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptors.Descriptor

Methods

addAllName(Iterable<? extends DescriptorProtos.UninterpretedOption.NamePart> values)

public DescriptorProtos.UninterpretedOption.Builder addAllName(Iterable<? extends DescriptorProtos.UninterpretedOption.NamePart> values)

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Parameter
NameDescription
valuesIterable<? extends com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePart>
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

addName(DescriptorProtos.UninterpretedOption.NamePart value)

public DescriptorProtos.UninterpretedOption.Builder addName(DescriptorProtos.UninterpretedOption.NamePart value)

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Parameter
NameDescription
valueDescriptorProtos.UninterpretedOption.NamePart
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

addName(DescriptorProtos.UninterpretedOption.NamePart.Builder builderForValue)

public DescriptorProtos.UninterpretedOption.Builder addName(DescriptorProtos.UninterpretedOption.NamePart.Builder builderForValue)

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Parameter
NameDescription
builderForValueDescriptorProtos.UninterpretedOption.NamePart.Builder
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

addName(int index, DescriptorProtos.UninterpretedOption.NamePart value)

public DescriptorProtos.UninterpretedOption.Builder addName(int index, DescriptorProtos.UninterpretedOption.NamePart value)

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Parameters
NameDescription
indexint
valueDescriptorProtos.UninterpretedOption.NamePart
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

addName(int index, DescriptorProtos.UninterpretedOption.NamePart.Builder builderForValue)

public DescriptorProtos.UninterpretedOption.Builder addName(int index, DescriptorProtos.UninterpretedOption.NamePart.Builder builderForValue)

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Parameters
NameDescription
indexint
builderForValueDescriptorProtos.UninterpretedOption.NamePart.Builder
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

addNameBuilder()

public DescriptorProtos.UninterpretedOption.NamePart.Builder addNameBuilder()

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.NamePart.Builder

addNameBuilder(int index)

public DescriptorProtos.UninterpretedOption.NamePart.Builder addNameBuilder(int index)

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.NamePart.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public DescriptorProtos.UninterpretedOption.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
valueObject
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder
Overrides

build()

public DescriptorProtos.UninterpretedOption build()
Returns
TypeDescription
DescriptorProtos.UninterpretedOption

buildPartial()

public DescriptorProtos.UninterpretedOption buildPartial()
Returns
TypeDescription
DescriptorProtos.UninterpretedOption

clear()

public DescriptorProtos.UninterpretedOption.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
TypeDescription
DescriptorProtos.UninterpretedOption.Builder
Overrides

clearAggregateValue()

public DescriptorProtos.UninterpretedOption.Builder clearAggregateValue()

optional string aggregate_value = 8;

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

clearDoubleValue()

public DescriptorProtos.UninterpretedOption.Builder clearDoubleValue()

optional double double_value = 6;

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public DescriptorProtos.UninterpretedOption.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldDescriptors.FieldDescriptor
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder
Overrides

clearIdentifierValue()

public DescriptorProtos.UninterpretedOption.Builder clearIdentifierValue()

The value of the uninterpreted option, in whatever type the tokenizer identified it as during parsing. Exactly one of these should be set.

optional string identifier_value = 3;

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

clearName()

public DescriptorProtos.UninterpretedOption.Builder clearName()

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

clearNegativeIntValue()

public DescriptorProtos.UninterpretedOption.Builder clearNegativeIntValue()

optional int64 negative_int_value = 5;

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

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

Parameter
NameDescription
oneofDescriptors.OneofDescriptor
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder
Overrides

clearPositiveIntValue()

public DescriptorProtos.UninterpretedOption.Builder clearPositiveIntValue()

optional uint64 positive_int_value = 4;

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

clearStringValue()

public DescriptorProtos.UninterpretedOption.Builder clearStringValue()

optional bytes string_value = 7;

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

clone()

public DescriptorProtos.UninterpretedOption.Builder clone()

Clones the Builder.

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder
Overrides

getAggregateValue()

public String getAggregateValue()

optional string aggregate_value = 8;

Returns
TypeDescription
String

The aggregateValue.

getAggregateValueBytes()

public ByteString getAggregateValueBytes()

optional string aggregate_value = 8;

Returns
TypeDescription
ByteString

The bytes for aggregateValue.

getDefaultInstanceForType()

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

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
TypeDescription
Descriptors.Descriptor
Overrides

getDoubleValue()

public double getDoubleValue()

optional double double_value = 6;

Returns
TypeDescription
double

The doubleValue.

getIdentifierValue()

public String getIdentifierValue()

The value of the uninterpreted option, in whatever type the tokenizer identified it as during parsing. Exactly one of these should be set.

optional string identifier_value = 3;

Returns
TypeDescription
String

The identifierValue.

getIdentifierValueBytes()

public ByteString getIdentifierValueBytes()

The value of the uninterpreted option, in whatever type the tokenizer identified it as during parsing. Exactly one of these should be set.

optional string identifier_value = 3;

Returns
TypeDescription
ByteString

The bytes for identifierValue.

getName(int index)

public DescriptorProtos.UninterpretedOption.NamePart getName(int index)

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.NamePart

getNameBuilder(int index)

public DescriptorProtos.UninterpretedOption.NamePart.Builder getNameBuilder(int index)

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.NamePart.Builder

getNameBuilderList()

public List<DescriptorProtos.UninterpretedOption.NamePart.Builder> getNameBuilderList()

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Returns
TypeDescription
List<Builder>

getNameCount()

public int getNameCount()

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Returns
TypeDescription
int

getNameList()

public List<DescriptorProtos.UninterpretedOption.NamePart> getNameList()

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Returns
TypeDescription
List<NamePart>

getNameOrBuilder(int index)

public DescriptorProtos.UninterpretedOption.NamePartOrBuilder getNameOrBuilder(int index)

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.NamePartOrBuilder

getNameOrBuilderList()

public List<? extends DescriptorProtos.UninterpretedOption.NamePartOrBuilder> getNameOrBuilderList()

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Returns
TypeDescription
List<? extends com.google.protobuf.DescriptorProtos.UninterpretedOption.NamePartOrBuilder>

getNegativeIntValue()

public long getNegativeIntValue()

optional int64 negative_int_value = 5;

Returns
TypeDescription
long

The negativeIntValue.

getPositiveIntValue()

public long getPositiveIntValue()

optional uint64 positive_int_value = 4;

Returns
TypeDescription
long

The positiveIntValue.

getStringValue()

public ByteString getStringValue()

optional bytes string_value = 7;

Returns
TypeDescription
ByteString

The stringValue.

hasAggregateValue()

public boolean hasAggregateValue()

optional string aggregate_value = 8;

Returns
TypeDescription
boolean

Whether the aggregateValue field is set.

hasDoubleValue()

public boolean hasDoubleValue()

optional double double_value = 6;

Returns
TypeDescription
boolean

Whether the doubleValue field is set.

hasIdentifierValue()

public boolean hasIdentifierValue()

The value of the uninterpreted option, in whatever type the tokenizer identified it as during parsing. Exactly one of these should be set.

optional string identifier_value = 3;

Returns
TypeDescription
boolean

Whether the identifierValue field is set.

hasNegativeIntValue()

public boolean hasNegativeIntValue()

optional int64 negative_int_value = 5;

Returns
TypeDescription
boolean

Whether the negativeIntValue field is set.

hasPositiveIntValue()

public boolean hasPositiveIntValue()

optional uint64 positive_int_value = 4;

Returns
TypeDescription
boolean

Whether the positiveIntValue field is set.

hasStringValue()

public boolean hasStringValue()

optional bytes string_value = 7;

Returns
TypeDescription
boolean

Whether the stringValue 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
TypeDescription
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
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public DescriptorProtos.UninterpretedOption.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
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(DescriptorProtos.UninterpretedOption other)

public DescriptorProtos.UninterpretedOption.Builder mergeFrom(DescriptorProtos.UninterpretedOption other)
Parameter
NameDescription
otherDescriptorProtos.UninterpretedOption
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

mergeFrom(Message other)

public DescriptorProtos.UninterpretedOption.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
NameDescription
otherMessage
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

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

Merge some unknown fields into the UnknownFieldSet for this message.

Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder
Overrides

removeName(int index)

public DescriptorProtos.UninterpretedOption.Builder removeName(int index)

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Parameter
NameDescription
indexint
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

setAggregateValue(String value)

public DescriptorProtos.UninterpretedOption.Builder setAggregateValue(String value)

optional string aggregate_value = 8;

Parameter
NameDescription
valueString

The aggregateValue to set.

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

setAggregateValueBytes(ByteString value)

public DescriptorProtos.UninterpretedOption.Builder setAggregateValueBytes(ByteString value)

optional string aggregate_value = 8;

Parameter
NameDescription
valueByteString

The bytes for aggregateValue to set.

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

setDoubleValue(double value)

public DescriptorProtos.UninterpretedOption.Builder setDoubleValue(double value)

optional double double_value = 6;

Parameter
NameDescription
valuedouble

The doubleValue to set.

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public DescriptorProtos.UninterpretedOption.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
valueObject
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder
Overrides

setIdentifierValue(String value)

public DescriptorProtos.UninterpretedOption.Builder setIdentifierValue(String value)

The value of the uninterpreted option, in whatever type the tokenizer identified it as during parsing. Exactly one of these should be set.

optional string identifier_value = 3;

Parameter
NameDescription
valueString

The identifierValue to set.

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

setIdentifierValueBytes(ByteString value)

public DescriptorProtos.UninterpretedOption.Builder setIdentifierValueBytes(ByteString value)

The value of the uninterpreted option, in whatever type the tokenizer identified it as during parsing. Exactly one of these should be set.

optional string identifier_value = 3;

Parameter
NameDescription
valueByteString

The bytes for identifierValue to set.

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

setName(int index, DescriptorProtos.UninterpretedOption.NamePart value)

public DescriptorProtos.UninterpretedOption.Builder setName(int index, DescriptorProtos.UninterpretedOption.NamePart value)

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Parameters
NameDescription
indexint
valueDescriptorProtos.UninterpretedOption.NamePart
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

setName(int index, DescriptorProtos.UninterpretedOption.NamePart.Builder builderForValue)

public DescriptorProtos.UninterpretedOption.Builder setName(int index, DescriptorProtos.UninterpretedOption.NamePart.Builder builderForValue)

repeated .google.protobuf.UninterpretedOption.NamePart name = 2;

Parameters
NameDescription
indexint
builderForValueDescriptorProtos.UninterpretedOption.NamePart.Builder
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

setNegativeIntValue(long value)

public DescriptorProtos.UninterpretedOption.Builder setNegativeIntValue(long value)

optional int64 negative_int_value = 5;

Parameter
NameDescription
valuelong

The negativeIntValue to set.

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

setPositiveIntValue(long value)

public DescriptorProtos.UninterpretedOption.Builder setPositiveIntValue(long value)

optional uint64 positive_int_value = 4;

Parameter
NameDescription
valuelong

The positiveIntValue to set.

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

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

public DescriptorProtos.UninterpretedOption.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldDescriptors.FieldDescriptor
indexint
valueObject
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder
Overrides

setStringValue(ByteString value)

public DescriptorProtos.UninterpretedOption.Builder setStringValue(ByteString value)

optional bytes string_value = 7;

Parameter
NameDescription
valueByteString

The stringValue to set.

Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final DescriptorProtos.UninterpretedOption.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DescriptorProtos.UninterpretedOption.Builder
Overrides