Class DescriptorProtos.DescriptorProto.ExtensionRange.Builder (3.19.4)

public static final class DescriptorProtos.DescriptorProto.ExtensionRange.Builder extends GeneratedMessageV3.Builder<DescriptorProtos.DescriptorProto.ExtensionRange.Builder> implements DescriptorProtos.DescriptorProto.ExtensionRangeOrBuilder

Protobuf type google.protobuf.DescriptorProto.ExtensionRange

Inheritance

Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > DescriptorProtos.DescriptorProto.ExtensionRange.Builder

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public DescriptorProtos.DescriptorProto.ExtensionRange build()
Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange

buildPartial()

public DescriptorProtos.DescriptorProto.ExtensionRange buildPartial()
Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange

clear()

public DescriptorProtos.DescriptorProto.ExtensionRange.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.DescriptorProto.ExtensionRange.Builder
Overrides

clearEnd()

public DescriptorProtos.DescriptorProto.ExtensionRange.Builder clearEnd()

Exclusive.

optional int32 end = 2;

Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public DescriptorProtos.DescriptorProto.ExtensionRange.Builder clearOneof(Descriptors.OneofDescriptor oneof)

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

Parameter
NameDescription
oneofDescriptors.OneofDescriptor
Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange.Builder
Overrides

clearOptions()

public DescriptorProtos.DescriptorProto.ExtensionRange.Builder clearOptions()

optional .google.protobuf.ExtensionRangeOptions options = 3;

Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange.Builder

clearStart()

public DescriptorProtos.DescriptorProto.ExtensionRange.Builder clearStart()

Inclusive.

optional int32 start = 1;

Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange.Builder

This builder for chaining.

clone()

public DescriptorProtos.DescriptorProto.ExtensionRange.Builder clone()

Clones the Builder.

Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange.Builder
Overrides

getDefaultInstanceForType()

public DescriptorProtos.DescriptorProto.ExtensionRange 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.DescriptorProto.ExtensionRange

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

getEnd()

public int getEnd()

Exclusive.

optional int32 end = 2;

Returns
TypeDescription
int

The end.

getOptions()

public DescriptorProtos.ExtensionRangeOptions getOptions()

optional .google.protobuf.ExtensionRangeOptions options = 3;

Returns
TypeDescription
DescriptorProtos.ExtensionRangeOptions

The options.

getOptionsBuilder()

public DescriptorProtos.ExtensionRangeOptions.Builder getOptionsBuilder()

optional .google.protobuf.ExtensionRangeOptions options = 3;

Returns
TypeDescription
DescriptorProtos.ExtensionRangeOptions.Builder

getOptionsOrBuilder()

public DescriptorProtos.ExtensionRangeOptionsOrBuilder getOptionsOrBuilder()

optional .google.protobuf.ExtensionRangeOptions options = 3;

Returns
TypeDescription
DescriptorProtos.ExtensionRangeOptionsOrBuilder

getStart()

public int getStart()

Inclusive.

optional int32 start = 1;

Returns
TypeDescription
int

The start.

hasEnd()

public boolean hasEnd()

Exclusive.

optional int32 end = 2;

Returns
TypeDescription
boolean

Whether the end field is set.

hasOptions()

public boolean hasOptions()

optional .google.protobuf.ExtensionRangeOptions options = 3;

Returns
TypeDescription
boolean

Whether the options field is set.

hasStart()

public boolean hasStart()

Inclusive.

optional int32 start = 1;

Returns
TypeDescription
boolean

Whether the start 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.DescriptorProto.ExtensionRange.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.DescriptorProto.ExtensionRange.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(DescriptorProtos.DescriptorProto.ExtensionRange other)

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

mergeFrom(Message other)

public DescriptorProtos.DescriptorProto.ExtensionRange.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.DescriptorProto.ExtensionRange.Builder
Overrides

mergeOptions(DescriptorProtos.ExtensionRangeOptions value)

public DescriptorProtos.DescriptorProto.ExtensionRange.Builder mergeOptions(DescriptorProtos.ExtensionRangeOptions value)

optional .google.protobuf.ExtensionRangeOptions options = 3;

Parameter
NameDescription
valueDescriptorProtos.ExtensionRangeOptions
Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final DescriptorProtos.DescriptorProto.ExtensionRange.Builder mergeUnknownFields(UnknownFieldSet unknownFields)

Merge some unknown fields into the UnknownFieldSet for this message.

Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange.Builder
Overrides

setEnd(int value)

public DescriptorProtos.DescriptorProto.ExtensionRange.Builder setEnd(int value)

Exclusive.

optional int32 end = 2;

Parameter
NameDescription
valueint

The end to set.

Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setOptions(DescriptorProtos.ExtensionRangeOptions value)

public DescriptorProtos.DescriptorProto.ExtensionRange.Builder setOptions(DescriptorProtos.ExtensionRangeOptions value)

optional .google.protobuf.ExtensionRangeOptions options = 3;

Parameter
NameDescription
valueDescriptorProtos.ExtensionRangeOptions
Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange.Builder

setOptions(DescriptorProtos.ExtensionRangeOptions.Builder builderForValue)

public DescriptorProtos.DescriptorProto.ExtensionRange.Builder setOptions(DescriptorProtos.ExtensionRangeOptions.Builder builderForValue)

optional .google.protobuf.ExtensionRangeOptions options = 3;

Parameter
NameDescription
builderForValueDescriptorProtos.ExtensionRangeOptions.Builder
Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange.Builder

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

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

setStart(int value)

public DescriptorProtos.DescriptorProto.ExtensionRange.Builder setStart(int value)

Inclusive.

optional int32 start = 1;

Parameter
NameDescription
valueint

The start to set.

Returns
TypeDescription
DescriptorProtos.DescriptorProto.ExtensionRange.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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