public static final class DescriptorProtos.ExtensionRangeOptions.Declaration.Builder extends GeneratedMessageV3.Builder<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder> implements DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
google.protobuf.ExtensionRangeOptions.Declaration
Modifier and Type | Method and Description |
---|---|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
Object value)
Like
setRepeatedField , but appends the value as a new element. |
DescriptorProtos.ExtensionRangeOptions.Declaration |
build()
Constructs the message based on the state of the Builder.
|
DescriptorProtos.ExtensionRangeOptions.Declaration |
buildPartial()
Like
MessageLite.Builder.build() , but does not throw an exception if the message is missing required
fields. |
DescriptorProtos.ExtensionRangeOptions.Declaration.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.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
clearField(Descriptors.FieldDescriptor field)
Clears the field.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
clearFullName()
The fully-qualified name of the extension field.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
clearNumber()
The extension number declared within the extension range.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
TODO: Clear it when all subclasses have implemented this method.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
clearRepeated()
If true, indicates that the extension must be defined as repeated.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
clearReserved()
If true, indicates that the number is reserved in the extension range,
and any extension field with the number will fail to compile.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
clearType()
The fully-qualified type name of the extension field.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
clone()
Clones the Builder.
|
DescriptorProtos.ExtensionRangeOptions.Declaration |
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.
|
String |
getFullName()
The fully-qualified name of the extension field.
|
ByteString |
getFullNameBytes()
The fully-qualified name of the extension field.
|
int |
getNumber()
The extension number declared within the extension range.
|
boolean |
getRepeated()
If true, indicates that the extension must be defined as repeated.
|
boolean |
getReserved()
If true, indicates that the number is reserved in the extension range,
and any extension field with the number will fail to compile.
|
String |
getType()
The fully-qualified type name of the extension field.
|
ByteString |
getTypeBytes()
The fully-qualified type name of the extension field.
|
boolean |
hasFullName()
The fully-qualified name of the extension field.
|
boolean |
hasNumber()
The extension number declared within the extension range.
|
boolean |
hasRepeated()
If true, indicates that the extension must be defined as repeated.
|
boolean |
hasReserved()
If true, indicates that the number is reserved in the extension range,
and any extension field with the number will fail to compile.
|
boolean |
hasType()
The fully-qualified type name of the extension field.
|
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.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry)
Like
MessageLite.Builder.mergeFrom(CodedInputStream) , but also parses extensions. |
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
mergeFrom(DescriptorProtos.ExtensionRangeOptions.Declaration other) |
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
mergeFrom(Message other)
Merge
other into the message being built. |
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
Merge some unknown fields into the
UnknownFieldSet for this message. |
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
setField(Descriptors.FieldDescriptor field,
Object value)
Sets a field to the given value.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
setFullName(String value)
The fully-qualified name of the extension field.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
setFullNameBytes(ByteString value)
The fully-qualified name of the extension field.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
setNumber(int value)
The extension number declared within the extension range.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
setRepeated(boolean value)
If true, indicates that the extension must be defined as repeated.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
Object value)
Sets an element of a repeated field to the given value.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
setReserved(boolean value)
If true, indicates that the number is reserved in the extension range,
and any extension field with the number will fail to compile.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
setType(String value)
The fully-qualified type name of the extension field.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
setTypeBytes(ByteString value)
The fully-qualified type name of the extension field.
|
DescriptorProtos.ExtensionRangeOptions.Declaration.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
Set the
UnknownFieldSet for this message. |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeDelimitedFrom, mergeDelimitedFrom
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessageV3.Builder
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder clear()
GeneratedMessageV3.Builder
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.Builder<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
public Descriptors.Descriptor getDescriptorForType()
Message.Builder
MessageOrBuilder.getDescriptorForType()
.getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
public DescriptorProtos.ExtensionRangeOptions.Declaration 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 DescriptorProtos.ExtensionRangeOptions.Declaration build()
MessageLite.Builder
build
in interface Message.Builder
build
in interface MessageLite.Builder
public DescriptorProtos.ExtensionRangeOptions.Declaration 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 DescriptorProtos.ExtensionRangeOptions.Declaration.Builder clone()
MessageLite.Builder
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
Object.clone()
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder setField(Descriptors.FieldDescriptor field, Object value)
Message.Builder
MessageOrBuilder.getField(Descriptors.FieldDescriptor)
returns.setField
in interface Message.Builder
setField
in class GeneratedMessageV3.Builder<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder clearField(Descriptors.FieldDescriptor field)
Message.Builder
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.Builder<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder clearOneof(Descriptors.OneofDescriptor oneof)
AbstractMessage.Builder
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Message.Builder
MessageOrBuilder.getRepeatedField(Descriptors.FieldDescriptor,int)
returns.setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.Builder<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Message.Builder
setRepeatedField
, but appends the value as a new element.addRepeatedField
in interface Message.Builder
addRepeatedField
in class GeneratedMessageV3.Builder<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
public DescriptorProtos.ExtensionRangeOptions.Declaration.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<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder mergeFrom(DescriptorProtos.ExtensionRangeOptions.Declaration other)
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.Builder<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws 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<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
InvalidProtocolBufferException
- the bytes read are not syntactically correct according
to the protobuf wire format specification. The data is corrupt, incomplete, or was never
a protobuf in the first place.IOException
- an I/O error reading from the streampublic boolean hasNumber()
The extension number declared within the extension range.
optional int32 number = 1;
hasNumber
in interface DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
public int getNumber()
The extension number declared within the extension range.
optional int32 number = 1;
getNumber
in interface DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder setNumber(int value)
The extension number declared within the extension range.
optional int32 number = 1;
value
- The number to set.public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder clearNumber()
The extension number declared within the extension range.
optional int32 number = 1;
public boolean hasFullName()
The fully-qualified name of the extension field. There must be a leading dot in front of the full name.
optional string full_name = 2;
hasFullName
in interface DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
public String getFullName()
The fully-qualified name of the extension field. There must be a leading dot in front of the full name.
optional string full_name = 2;
getFullName
in interface DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
public ByteString getFullNameBytes()
The fully-qualified name of the extension field. There must be a leading dot in front of the full name.
optional string full_name = 2;
getFullNameBytes
in interface DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder setFullName(String value)
The fully-qualified name of the extension field. There must be a leading dot in front of the full name.
optional string full_name = 2;
value
- The fullName to set.public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder clearFullName()
The fully-qualified name of the extension field. There must be a leading dot in front of the full name.
optional string full_name = 2;
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder setFullNameBytes(ByteString value)
The fully-qualified name of the extension field. There must be a leading dot in front of the full name.
optional string full_name = 2;
value
- The bytes for fullName to set.public boolean hasType()
The fully-qualified type name of the extension field. Unlike Metadata.type, Declaration.type must have a leading dot for messages and enums.
optional string type = 3;
hasType
in interface DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
public String getType()
The fully-qualified type name of the extension field. Unlike Metadata.type, Declaration.type must have a leading dot for messages and enums.
optional string type = 3;
getType
in interface DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
public ByteString getTypeBytes()
The fully-qualified type name of the extension field. Unlike Metadata.type, Declaration.type must have a leading dot for messages and enums.
optional string type = 3;
getTypeBytes
in interface DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder setType(String value)
The fully-qualified type name of the extension field. Unlike Metadata.type, Declaration.type must have a leading dot for messages and enums.
optional string type = 3;
value
- The type to set.public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder clearType()
The fully-qualified type name of the extension field. Unlike Metadata.type, Declaration.type must have a leading dot for messages and enums.
optional string type = 3;
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder setTypeBytes(ByteString value)
The fully-qualified type name of the extension field. Unlike Metadata.type, Declaration.type must have a leading dot for messages and enums.
optional string type = 3;
value
- The bytes for type to set.public boolean hasReserved()
If true, indicates that the number is reserved in the extension range, and any extension field with the number will fail to compile. Set this when a declared extension field is deleted.
optional bool reserved = 5;
hasReserved
in interface DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
public boolean getReserved()
If true, indicates that the number is reserved in the extension range, and any extension field with the number will fail to compile. Set this when a declared extension field is deleted.
optional bool reserved = 5;
getReserved
in interface DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder setReserved(boolean value)
If true, indicates that the number is reserved in the extension range, and any extension field with the number will fail to compile. Set this when a declared extension field is deleted.
optional bool reserved = 5;
value
- The reserved to set.public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder clearReserved()
If true, indicates that the number is reserved in the extension range, and any extension field with the number will fail to compile. Set this when a declared extension field is deleted.
optional bool reserved = 5;
public boolean hasRepeated()
If true, indicates that the extension must be defined as repeated. Otherwise the extension must be defined as optional.
optional bool repeated = 6;
hasRepeated
in interface DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
public boolean getRepeated()
If true, indicates that the extension must be defined as repeated. Otherwise the extension must be defined as optional.
optional bool repeated = 6;
getRepeated
in interface DescriptorProtos.ExtensionRangeOptions.DeclarationOrBuilder
public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder setRepeated(boolean value)
If true, indicates that the extension must be defined as repeated. Otherwise the extension must be defined as optional.
optional bool repeated = 6;
value
- The repeated to set.public DescriptorProtos.ExtensionRangeOptions.Declaration.Builder clearRepeated()
If true, indicates that the extension must be defined as repeated. Otherwise the extension must be defined as optional.
optional bool repeated = 6;
public final DescriptorProtos.ExtensionRangeOptions.Declaration.Builder setUnknownFields(UnknownFieldSet unknownFields)
Message.Builder
UnknownFieldSet
for this message.setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
public final DescriptorProtos.ExtensionRangeOptions.Declaration.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Message.Builder
UnknownFieldSet
for this message.mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<DescriptorProtos.ExtensionRangeOptions.Declaration.Builder>
Copyright © 2008–2024. All rights reserved.