public static final class DescriptorProtos.FieldOptions.Builder extends GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder> implements DescriptorProtos.FieldOptionsOrBuilder
google.protobuf.FieldOptions
Modifier and Type | Method and Description |
---|---|
DescriptorProtos.FieldOptions.Builder |
addAllUninterpretedOption(Iterable<? extends DescriptorProtos.UninterpretedOption> values)
The parser stores options it doesn't recognize here.
|
<Type> DescriptorProtos.FieldOptions.Builder |
addExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,List<Type>> extension,
Type value)
Append a value to a repeated extension.
|
DescriptorProtos.FieldOptions.Builder |
addRepeatedField(Descriptors.FieldDescriptor field,
Object value)
Like
setRepeatedField , but appends the value as a new element. |
DescriptorProtos.FieldOptions.Builder |
addUninterpretedOption(DescriptorProtos.UninterpretedOption.Builder builderForValue)
The parser stores options it doesn't recognize here.
|
DescriptorProtos.FieldOptions.Builder |
addUninterpretedOption(DescriptorProtos.UninterpretedOption value)
The parser stores options it doesn't recognize here.
|
DescriptorProtos.FieldOptions.Builder |
addUninterpretedOption(int index,
DescriptorProtos.UninterpretedOption.Builder builderForValue)
The parser stores options it doesn't recognize here.
|
DescriptorProtos.FieldOptions.Builder |
addUninterpretedOption(int index,
DescriptorProtos.UninterpretedOption value)
The parser stores options it doesn't recognize here.
|
DescriptorProtos.UninterpretedOption.Builder |
addUninterpretedOptionBuilder()
The parser stores options it doesn't recognize here.
|
DescriptorProtos.UninterpretedOption.Builder |
addUninterpretedOptionBuilder(int index)
The parser stores options it doesn't recognize here.
|
DescriptorProtos.FieldOptions |
build()
Constructs the message based on the state of the Builder.
|
DescriptorProtos.FieldOptions |
buildPartial()
Like
MessageLite.Builder.build() , but does not throw an exception if the message is missing required
fields. |
DescriptorProtos.FieldOptions.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.FieldOptions.Builder |
clearCtype()
The ctype option instructs the C++ code generator to use a different
representation of the field than it normally would.
|
DescriptorProtos.FieldOptions.Builder |
clearDeprecated()
Is this field deprecated?
Depending on the target platform, this can emit Deprecated annotations
for accessors, or it will be completely ignored; in the very least, this
is a formalization for deprecating fields.
|
<Type> DescriptorProtos.FieldOptions.Builder |
clearExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,?> extension)
Clear an extension.
|
DescriptorProtos.FieldOptions.Builder |
clearField(Descriptors.FieldDescriptor field)
Clears the field.
|
DescriptorProtos.FieldOptions.Builder |
clearJstype()
The jstype option determines the JavaScript type used for values of the
field.
|
DescriptorProtos.FieldOptions.Builder |
clearLazy()
Should this field be parsed lazily? Lazy applies only to message-type
fields.
|
DescriptorProtos.FieldOptions.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
TODO(jieluo): Clear it when all subclasses have implemented this method.
|
DescriptorProtos.FieldOptions.Builder |
clearPacked()
The packed option can be enabled for repeated primitive fields to enable
a more efficient representation on the wire.
|
DescriptorProtos.FieldOptions.Builder |
clearUninterpretedOption()
The parser stores options it doesn't recognize here.
|
DescriptorProtos.FieldOptions.Builder |
clearWeak()
For Google-internal migration only.
|
DescriptorProtos.FieldOptions.Builder |
clone()
Clones the Builder.
|
DescriptorProtos.FieldOptions.CType |
getCtype()
The ctype option instructs the C++ code generator to use a different
representation of the field than it normally would.
|
DescriptorProtos.FieldOptions |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
boolean |
getDeprecated()
Is this field deprecated?
Depending on the target platform, this can emit Deprecated annotations
for accessors, or it will be completely ignored; in the very least, this
is a formalization for deprecating fields.
|
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType()
Get the message's type's descriptor.
|
DescriptorProtos.FieldOptions.JSType |
getJstype()
The jstype option determines the JavaScript type used for values of the
field.
|
boolean |
getLazy()
Should this field be parsed lazily? Lazy applies only to message-type
fields.
|
boolean |
getPacked()
The packed option can be enabled for repeated primitive fields to enable
a more efficient representation on the wire.
|
DescriptorProtos.UninterpretedOption |
getUninterpretedOption(int index)
The parser stores options it doesn't recognize here.
|
DescriptorProtos.UninterpretedOption.Builder |
getUninterpretedOptionBuilder(int index)
The parser stores options it doesn't recognize here.
|
List<DescriptorProtos.UninterpretedOption.Builder> |
getUninterpretedOptionBuilderList()
The parser stores options it doesn't recognize here.
|
int |
getUninterpretedOptionCount()
The parser stores options it doesn't recognize here.
|
List<DescriptorProtos.UninterpretedOption> |
getUninterpretedOptionList()
The parser stores options it doesn't recognize here.
|
DescriptorProtos.UninterpretedOptionOrBuilder |
getUninterpretedOptionOrBuilder(int index)
The parser stores options it doesn't recognize here.
|
List<? extends DescriptorProtos.UninterpretedOptionOrBuilder> |
getUninterpretedOptionOrBuilderList()
The parser stores options it doesn't recognize here.
|
boolean |
getWeak()
For Google-internal migration only.
|
boolean |
hasCtype()
The ctype option instructs the C++ code generator to use a different
representation of the field than it normally would.
|
boolean |
hasDeprecated()
Is this field deprecated?
Depending on the target platform, this can emit Deprecated annotations
for accessors, or it will be completely ignored; in the very least, this
is a formalization for deprecating fields.
|
boolean |
hasJstype()
The jstype option determines the JavaScript type used for values of the
field.
|
boolean |
hasLazy()
Should this field be parsed lazily? Lazy applies only to message-type
fields.
|
boolean |
hasPacked()
The packed option can be enabled for repeated primitive fields to enable
a more efficient representation on the wire.
|
boolean |
hasWeak()
For Google-internal migration only.
|
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.FieldOptions.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry)
Like
MessageLite.Builder.mergeFrom(CodedInputStream) , but also parses extensions. |
DescriptorProtos.FieldOptions.Builder |
mergeFrom(DescriptorProtos.FieldOptions other) |
DescriptorProtos.FieldOptions.Builder |
mergeFrom(Message other)
Merge
other into the message being built. |
DescriptorProtos.FieldOptions.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
Merge some unknown fields into the
UnknownFieldSet for this message. |
DescriptorProtos.FieldOptions.Builder |
removeUninterpretedOption(int index)
The parser stores options it doesn't recognize here.
|
DescriptorProtos.FieldOptions.Builder |
setCtype(DescriptorProtos.FieldOptions.CType value)
The ctype option instructs the C++ code generator to use a different
representation of the field than it normally would.
|
DescriptorProtos.FieldOptions.Builder |
setDeprecated(boolean value)
Is this field deprecated?
Depending on the target platform, this can emit Deprecated annotations
for accessors, or it will be completely ignored; in the very least, this
is a formalization for deprecating fields.
|
<Type> DescriptorProtos.FieldOptions.Builder |
setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,List<Type>> extension,
int index,
Type value)
Set the value of one element of a repeated extension.
|
<Type> DescriptorProtos.FieldOptions.Builder |
setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,Type> extension,
Type value)
Set the value of an extension.
|
DescriptorProtos.FieldOptions.Builder |
setField(Descriptors.FieldDescriptor field,
Object value)
Sets a field to the given value.
|
DescriptorProtos.FieldOptions.Builder |
setJstype(DescriptorProtos.FieldOptions.JSType value)
The jstype option determines the JavaScript type used for values of the
field.
|
DescriptorProtos.FieldOptions.Builder |
setLazy(boolean value)
Should this field be parsed lazily? Lazy applies only to message-type
fields.
|
DescriptorProtos.FieldOptions.Builder |
setPacked(boolean value)
The packed option can be enabled for repeated primitive fields to enable
a more efficient representation on the wire.
|
DescriptorProtos.FieldOptions.Builder |
setRepeatedField(Descriptors.FieldDescriptor field,
int index,
Object value)
Sets an element of a repeated field to the given value.
|
DescriptorProtos.FieldOptions.Builder |
setUninterpretedOption(int index,
DescriptorProtos.UninterpretedOption.Builder builderForValue)
The parser stores options it doesn't recognize here.
|
DescriptorProtos.FieldOptions.Builder |
setUninterpretedOption(int index,
DescriptorProtos.UninterpretedOption value)
The parser stores options it doesn't recognize here.
|
DescriptorProtos.FieldOptions.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
Set the
UnknownFieldSet for this message. |
DescriptorProtos.FieldOptions.Builder |
setWeak(boolean value)
For Google-internal migration only.
|
addExtension, addExtension, clearExtension, clearExtension, extensionsAreInitialized, getAllFields, getExtension, getExtension, getExtension, getExtension, getExtension, getExtension, getExtensionCount, getExtensionCount, getExtensionCount, getField, getFieldBuilder, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, hasExtension, hasExtension, hasExtension, hasField, mergeExtensionFields, newBuilderForField, setExtension, setExtension, setExtension, setExtension
getOneofFieldDescriptor, getParentForChildren, getUnknownFields, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, onBuilt, onChanged, setUnknownFieldsProto3
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
addAll, addAll, mergeFrom, newUninitializedMessageException
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getExtension, getExtension, getExtension, getExtension, getExtension, getExtension, getExtensionCount, getExtensionCount, getExtensionCount, hasExtension, hasExtension, hasExtension
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
mergeFrom
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessageV3.Builder
internalGetFieldAccessorTable
in class GeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
public DescriptorProtos.FieldOptions.Builder clear()
GeneratedMessageV3.Builder
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
public Descriptors.Descriptor getDescriptorForType()
Message.Builder
MessageOrBuilder.getDescriptorForType()
.getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
public DescriptorProtos.FieldOptions 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 GeneratedMessageV3.ExtendableMessageOrBuilder<DescriptorProtos.FieldOptions>
getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public DescriptorProtos.FieldOptions build()
MessageLite.Builder
build
in interface Message.Builder
build
in interface MessageLite.Builder
public DescriptorProtos.FieldOptions 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.FieldOptions.Builder clone()
MessageLite.Builder
clone
in interface Message.Builder
clone
in interface MessageLite.Builder
clone
in class GeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
Object.clone()
public DescriptorProtos.FieldOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Message.Builder
MessageOrBuilder.getField(Descriptors.FieldDescriptor)
would return.setField
in interface Message.Builder
setField
in class GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
public DescriptorProtos.FieldOptions.Builder clearField(Descriptors.FieldDescriptor field)
Message.Builder
clearField
in interface Message.Builder
clearField
in class GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
public DescriptorProtos.FieldOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
AbstractMessage.Builder
clearOneof
in interface Message.Builder
clearOneof
in class GeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
public DescriptorProtos.FieldOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Message.Builder
MessageOrBuilder.getRepeatedField(Descriptors.FieldDescriptor,int)
would return.setRepeatedField
in interface Message.Builder
setRepeatedField
in class GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
public DescriptorProtos.FieldOptions.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.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
public <Type> DescriptorProtos.FieldOptions.Builder setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,Type> extension, Type value)
GeneratedMessageV3.ExtendableBuilder
public <Type> DescriptorProtos.FieldOptions.Builder setExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,List<Type>> extension, int index, Type value)
GeneratedMessageV3.ExtendableBuilder
public <Type> DescriptorProtos.FieldOptions.Builder addExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,List<Type>> extension, Type value)
GeneratedMessageV3.ExtendableBuilder
public <Type> DescriptorProtos.FieldOptions.Builder clearExtension(GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions,?> extension)
GeneratedMessageV3.ExtendableBuilder
public DescriptorProtos.FieldOptions.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.FieldOptions.Builder>
public DescriptorProtos.FieldOptions.Builder mergeFrom(DescriptorProtos.FieldOptions other)
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
public DescriptorProtos.FieldOptions.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.FieldOptions.Builder>
IOException
public boolean hasCtype()
The ctype option instructs the C++ code generator to use a different representation of the field than it normally would. See the specific options below. This option is not yet implemented in the open source release -- sorry, we'll try to include it in a future version!
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
hasCtype
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.FieldOptions.CType getCtype()
The ctype option instructs the C++ code generator to use a different representation of the field than it normally would. See the specific options below. This option is not yet implemented in the open source release -- sorry, we'll try to include it in a future version!
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
getCtype
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.FieldOptions.Builder setCtype(DescriptorProtos.FieldOptions.CType value)
The ctype option instructs the C++ code generator to use a different representation of the field than it normally would. See the specific options below. This option is not yet implemented in the open source release -- sorry, we'll try to include it in a future version!
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
value
- The ctype to set.public DescriptorProtos.FieldOptions.Builder clearCtype()
The ctype option instructs the C++ code generator to use a different representation of the field than it normally would. See the specific options below. This option is not yet implemented in the open source release -- sorry, we'll try to include it in a future version!
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
public boolean hasPacked()
The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire. Rather than repeatedly writing the tag and type for each element, the entire array is encoded as a single length-delimited blob. In proto3, only explicit setting it to false will avoid using packed encoding.
optional bool packed = 2;
hasPacked
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean getPacked()
The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire. Rather than repeatedly writing the tag and type for each element, the entire array is encoded as a single length-delimited blob. In proto3, only explicit setting it to false will avoid using packed encoding.
optional bool packed = 2;
getPacked
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.FieldOptions.Builder setPacked(boolean value)
The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire. Rather than repeatedly writing the tag and type for each element, the entire array is encoded as a single length-delimited blob. In proto3, only explicit setting it to false will avoid using packed encoding.
optional bool packed = 2;
value
- The packed to set.public DescriptorProtos.FieldOptions.Builder clearPacked()
The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire. Rather than repeatedly writing the tag and type for each element, the entire array is encoded as a single length-delimited blob. In proto3, only explicit setting it to false will avoid using packed encoding.
optional bool packed = 2;
public boolean hasJstype()
The jstype option determines the JavaScript type used for values of the field. The option is permitted only for 64 bit integral and fixed types (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING is represented as JavaScript string, which avoids loss of precision that can happen when a large value is converted to a floating point JavaScript. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript "number" type. The behavior of the default option JS_NORMAL is implementation dependent. This option is an enum to permit additional types to be added, e.g. goog.math.Integer.
optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
hasJstype
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.FieldOptions.JSType getJstype()
The jstype option determines the JavaScript type used for values of the field. The option is permitted only for 64 bit integral and fixed types (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING is represented as JavaScript string, which avoids loss of precision that can happen when a large value is converted to a floating point JavaScript. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript "number" type. The behavior of the default option JS_NORMAL is implementation dependent. This option is an enum to permit additional types to be added, e.g. goog.math.Integer.
optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
getJstype
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.FieldOptions.Builder setJstype(DescriptorProtos.FieldOptions.JSType value)
The jstype option determines the JavaScript type used for values of the field. The option is permitted only for 64 bit integral and fixed types (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING is represented as JavaScript string, which avoids loss of precision that can happen when a large value is converted to a floating point JavaScript. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript "number" type. The behavior of the default option JS_NORMAL is implementation dependent. This option is an enum to permit additional types to be added, e.g. goog.math.Integer.
optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
value
- The jstype to set.public DescriptorProtos.FieldOptions.Builder clearJstype()
The jstype option determines the JavaScript type used for values of the field. The option is permitted only for 64 bit integral and fixed types (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING is represented as JavaScript string, which avoids loss of precision that can happen when a large value is converted to a floating point JavaScript. Specifying JS_NUMBER for the jstype causes the generated JavaScript code to use the JavaScript "number" type. The behavior of the default option JS_NORMAL is implementation dependent. This option is an enum to permit additional types to be added, e.g. goog.math.Integer.
optional .google.protobuf.FieldOptions.JSType jstype = 6 [default = JS_NORMAL];
public boolean hasLazy()
Should this field be parsed lazily? Lazy applies only to message-type fields. It means that when the outer message is initially parsed, the inner message's contents will not be parsed but instead stored in encoded form. The inner message will actually be parsed when it is first accessed. This is only a hint. Implementations are free to choose whether to use eager or lazy parsing regardless of the value of this option. However, setting this option true suggests that the protocol author believes that using lazy parsing on this field is worth the additional bookkeeping overhead typically needed to implement it. This option does not affect the public interface of any generated code; all method signatures remain the same. Furthermore, thread-safety of the interface is not affected by this option; const methods remain safe to call from multiple threads concurrently, while non-const methods continue to require exclusive access. Note that implementations may choose not to check required fields within a lazy sub-message. That is, calling IsInitialized() on the outer message may return true even if the inner message has missing required fields. This is necessary because otherwise the inner message would have to be parsed in order to perform the check, defeating the purpose of lazy parsing. An implementation which chooses not to check required fields must be consistent about it. That is, for any particular sub-message, the implementation must either *always* check its required fields, or *never* check its required fields, regardless of whether or not the message has been parsed.
optional bool lazy = 5 [default = false];
hasLazy
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean getLazy()
Should this field be parsed lazily? Lazy applies only to message-type fields. It means that when the outer message is initially parsed, the inner message's contents will not be parsed but instead stored in encoded form. The inner message will actually be parsed when it is first accessed. This is only a hint. Implementations are free to choose whether to use eager or lazy parsing regardless of the value of this option. However, setting this option true suggests that the protocol author believes that using lazy parsing on this field is worth the additional bookkeeping overhead typically needed to implement it. This option does not affect the public interface of any generated code; all method signatures remain the same. Furthermore, thread-safety of the interface is not affected by this option; const methods remain safe to call from multiple threads concurrently, while non-const methods continue to require exclusive access. Note that implementations may choose not to check required fields within a lazy sub-message. That is, calling IsInitialized() on the outer message may return true even if the inner message has missing required fields. This is necessary because otherwise the inner message would have to be parsed in order to perform the check, defeating the purpose of lazy parsing. An implementation which chooses not to check required fields must be consistent about it. That is, for any particular sub-message, the implementation must either *always* check its required fields, or *never* check its required fields, regardless of whether or not the message has been parsed.
optional bool lazy = 5 [default = false];
getLazy
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.FieldOptions.Builder setLazy(boolean value)
Should this field be parsed lazily? Lazy applies only to message-type fields. It means that when the outer message is initially parsed, the inner message's contents will not be parsed but instead stored in encoded form. The inner message will actually be parsed when it is first accessed. This is only a hint. Implementations are free to choose whether to use eager or lazy parsing regardless of the value of this option. However, setting this option true suggests that the protocol author believes that using lazy parsing on this field is worth the additional bookkeeping overhead typically needed to implement it. This option does not affect the public interface of any generated code; all method signatures remain the same. Furthermore, thread-safety of the interface is not affected by this option; const methods remain safe to call from multiple threads concurrently, while non-const methods continue to require exclusive access. Note that implementations may choose not to check required fields within a lazy sub-message. That is, calling IsInitialized() on the outer message may return true even if the inner message has missing required fields. This is necessary because otherwise the inner message would have to be parsed in order to perform the check, defeating the purpose of lazy parsing. An implementation which chooses not to check required fields must be consistent about it. That is, for any particular sub-message, the implementation must either *always* check its required fields, or *never* check its required fields, regardless of whether or not the message has been parsed.
optional bool lazy = 5 [default = false];
value
- The lazy to set.public DescriptorProtos.FieldOptions.Builder clearLazy()
Should this field be parsed lazily? Lazy applies only to message-type fields. It means that when the outer message is initially parsed, the inner message's contents will not be parsed but instead stored in encoded form. The inner message will actually be parsed when it is first accessed. This is only a hint. Implementations are free to choose whether to use eager or lazy parsing regardless of the value of this option. However, setting this option true suggests that the protocol author believes that using lazy parsing on this field is worth the additional bookkeeping overhead typically needed to implement it. This option does not affect the public interface of any generated code; all method signatures remain the same. Furthermore, thread-safety of the interface is not affected by this option; const methods remain safe to call from multiple threads concurrently, while non-const methods continue to require exclusive access. Note that implementations may choose not to check required fields within a lazy sub-message. That is, calling IsInitialized() on the outer message may return true even if the inner message has missing required fields. This is necessary because otherwise the inner message would have to be parsed in order to perform the check, defeating the purpose of lazy parsing. An implementation which chooses not to check required fields must be consistent about it. That is, for any particular sub-message, the implementation must either *always* check its required fields, or *never* check its required fields, regardless of whether or not the message has been parsed.
optional bool lazy = 5 [default = false];
public boolean hasDeprecated()
Is this field deprecated? Depending on the target platform, this can emit Deprecated annotations for accessors, or it will be completely ignored; in the very least, this is a formalization for deprecating fields.
optional bool deprecated = 3 [default = false];
hasDeprecated
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean getDeprecated()
Is this field deprecated? Depending on the target platform, this can emit Deprecated annotations for accessors, or it will be completely ignored; in the very least, this is a formalization for deprecating fields.
optional bool deprecated = 3 [default = false];
getDeprecated
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.FieldOptions.Builder setDeprecated(boolean value)
Is this field deprecated? Depending on the target platform, this can emit Deprecated annotations for accessors, or it will be completely ignored; in the very least, this is a formalization for deprecating fields.
optional bool deprecated = 3 [default = false];
value
- The deprecated to set.public DescriptorProtos.FieldOptions.Builder clearDeprecated()
Is this field deprecated? Depending on the target platform, this can emit Deprecated annotations for accessors, or it will be completely ignored; in the very least, this is a formalization for deprecating fields.
optional bool deprecated = 3 [default = false];
public boolean hasWeak()
For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
hasWeak
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean getWeak()
For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
getWeak
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.FieldOptions.Builder setWeak(boolean value)
For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
value
- The weak to set.public DescriptorProtos.FieldOptions.Builder clearWeak()
For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
public List<DescriptorProtos.UninterpretedOption> getUninterpretedOptionList()
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
getUninterpretedOptionList
in interface DescriptorProtos.FieldOptionsOrBuilder
public int getUninterpretedOptionCount()
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
getUninterpretedOptionCount
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.UninterpretedOption getUninterpretedOption(int index)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
getUninterpretedOption
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.FieldOptions.Builder setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public DescriptorProtos.FieldOptions.Builder setUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public DescriptorProtos.FieldOptions.Builder addUninterpretedOption(DescriptorProtos.UninterpretedOption value)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public DescriptorProtos.FieldOptions.Builder addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption value)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public DescriptorProtos.FieldOptions.Builder addUninterpretedOption(DescriptorProtos.UninterpretedOption.Builder builderForValue)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public DescriptorProtos.FieldOptions.Builder addUninterpretedOption(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public DescriptorProtos.FieldOptions.Builder addAllUninterpretedOption(Iterable<? extends DescriptorProtos.UninterpretedOption> values)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public DescriptorProtos.FieldOptions.Builder clearUninterpretedOption()
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public DescriptorProtos.FieldOptions.Builder removeUninterpretedOption(int index)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public DescriptorProtos.UninterpretedOption.Builder getUninterpretedOptionBuilder(int index)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public DescriptorProtos.UninterpretedOptionOrBuilder getUninterpretedOptionOrBuilder(int index)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
getUninterpretedOptionOrBuilder
in interface DescriptorProtos.FieldOptionsOrBuilder
public List<? extends DescriptorProtos.UninterpretedOptionOrBuilder> getUninterpretedOptionOrBuilderList()
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
getUninterpretedOptionOrBuilderList
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.UninterpretedOption.Builder addUninterpretedOptionBuilder()
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public DescriptorProtos.UninterpretedOption.Builder addUninterpretedOptionBuilder(int index)
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public List<DescriptorProtos.UninterpretedOption.Builder> getUninterpretedOptionBuilderList()
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
public final DescriptorProtos.FieldOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Message.Builder
UnknownFieldSet
for this message.setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
public final DescriptorProtos.FieldOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Message.Builder
UnknownFieldSet
for this message.mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
Copyright © 2008–2019. All rights reserved.