Package com.google.protobuf
Class DescriptorProtos.FieldOptions.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
com.google.protobuf.DescriptorProtos.FieldOptions.Builder
- All Implemented Interfaces:
DescriptorProtos.FieldOptionsOrBuilder
,com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<DescriptorProtos.FieldOptions>
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- DescriptorProtos.FieldOptions
public static final class DescriptorProtos.FieldOptions.Builder
extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,DescriptorProtos.FieldOptions.Builder>
implements DescriptorProtos.FieldOptionsOrBuilder
Protobuf type
google.protobuf.FieldOptions
-
Method Summary
Modifier and TypeMethodDescriptionaddAllUninterpretedOption
(Iterable<? extends DescriptorProtos.UninterpretedOption> values) The parser stores options it doesn't recognize here.addExtension
(com.google.protobuf.GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions, List<Type>> extension, Type value) addRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) addUninterpretedOption
(int index, DescriptorProtos.UninterpretedOption value) The parser stores options it doesn't recognize here.addUninterpretedOption
(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue) The parser stores options it doesn't recognize here.The parser stores options it doesn't recognize here.addUninterpretedOption
(DescriptorProtos.UninterpretedOption.Builder builderForValue) The parser stores options it doesn't recognize here.The parser stores options it doesn't recognize here.addUninterpretedOptionBuilder
(int index) The parser stores options it doesn't recognize here.build()
clear()
The ctype option instructs the C++ code generator to use a different representation of the field than it normally would.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.clearExtension
(com.google.protobuf.GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions, ?> extension) clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) The jstype option determines the JavaScript type used for values of the field.Should this field be parsed lazily? Lazy applies only to message-type fields.clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire.The parser stores options it doesn't recognize here.For Google-internal migration only.clone()
getCtype()
The ctype option instructs the C++ code generator to use a different representation of the field than it normally would.boolean
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 final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
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
The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire.getUninterpretedOption
(int index) The parser stores options it doesn't recognize here.getUninterpretedOptionBuilder
(int index) The parser stores options it doesn't recognize here.The parser stores options it doesn't recognize here.int
The parser stores options it doesn't recognize here.The parser stores options it doesn't recognize here.getUninterpretedOptionOrBuilder
(int index) The parser stores options it doesn't recognize here.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
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
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
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 com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) removeUninterpretedOption
(int index) The parser stores options it doesn't recognize here.The ctype option instructs the C++ code generator to use a different representation of the field than it normally would.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.setExtension
(com.google.protobuf.GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions, List<Type>> extension, int index, Type value) setExtension
(com.google.protobuf.GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions, Type> extension, Type value) The jstype option determines the JavaScript type used for values of the field.setLazy
(boolean value) Should this field be parsed lazily? Lazy applies only to message-type fields.setPacked
(boolean value) The packed option can be enabled for repeated primitive fields to enable a more efficient representation on the wire.setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setUninterpretedOption
(int index, DescriptorProtos.UninterpretedOption value) The parser stores options it doesn't recognize here.setUninterpretedOption
(int index, DescriptorProtos.UninterpretedOption.Builder builderForValue) The parser stores options it doesn't recognize here.setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) setWeak
(boolean value) For Google-internal migration only.Methods inherited from class com.google.protobuf.GeneratedMessageV3.ExtendableBuilder
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, parseUnknownField, setExtension, setExtension, setExtension, setExtension
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getOneofFieldDescriptor, getParentForChildren, getUnknownFields, getUnknownFieldSetBuilder, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, onBuilt, onChanged, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder
getExtension, getExtension, getExtension, getExtension, getExtension, getExtension, getExtensionCount, getExtensionCount, getExtensionCount, hasExtension, hasExtension, hasExtension
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,
DescriptorProtos.FieldOptions.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<DescriptorProtos.FieldOptions>
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
-
setField
public DescriptorProtos.FieldOptions.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,
DescriptorProtos.FieldOptions.Builder>
-
clearField
public DescriptorProtos.FieldOptions.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) - Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,
DescriptorProtos.FieldOptions.Builder>
-
clearOneof
public DescriptorProtos.FieldOptions.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) - Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
-
setRepeatedField
public DescriptorProtos.FieldOptions.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,
DescriptorProtos.FieldOptions.Builder>
-
addRepeatedField
public DescriptorProtos.FieldOptions.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,
DescriptorProtos.FieldOptions.Builder>
-
setExtension
public <Type> DescriptorProtos.FieldOptions.Builder setExtension(com.google.protobuf.GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions, Type> extension, Type value) - Overrides:
setExtension
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,
DescriptorProtos.FieldOptions.Builder>
-
setExtension
public <Type> DescriptorProtos.FieldOptions.Builder setExtension(com.google.protobuf.GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions, List<Type>> extension, int index, Type value) - Overrides:
setExtension
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,
DescriptorProtos.FieldOptions.Builder>
-
addExtension
public <Type> DescriptorProtos.FieldOptions.Builder addExtension(com.google.protobuf.GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions, List<Type>> extension, Type value) - Overrides:
addExtension
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,
DescriptorProtos.FieldOptions.Builder>
-
clearExtension
public <Type> DescriptorProtos.FieldOptions.Builder clearExtension(com.google.protobuf.GeneratedMessage.GeneratedExtension<DescriptorProtos.FieldOptions, ?> extension) - Overrides:
clearExtension
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,
DescriptorProtos.FieldOptions.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<DescriptorProtos.FieldOptions.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.ExtendableBuilder<DescriptorProtos.FieldOptions,
DescriptorProtos.FieldOptions.Builder>
-
mergeFrom
public DescriptorProtos.FieldOptions.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<DescriptorProtos.FieldOptions.Builder>
- Throws:
IOException
-
hasCtype
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];
- Specified by:
hasCtype
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the ctype field is set.
-
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];
- Specified by:
getCtype
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The ctype.
-
setCtype
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];
- Parameters:
value
- The ctype to set.- Returns:
- This builder for chaining.
-
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];
- Returns:
- This builder for chaining.
-
hasPacked
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;
- Specified by:
hasPacked
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the packed field is set.
-
getPacked
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;
- Specified by:
getPacked
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The packed.
-
setPacked
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;
- Parameters:
value
- The packed to set.- Returns:
- This builder for chaining.
-
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;
- Returns:
- This builder for chaining.
-
hasJstype
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];
- Specified by:
hasJstype
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the jstype field is set.
-
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];
- Specified by:
getJstype
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The jstype.
-
setJstype
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];
- Parameters:
value
- The jstype to set.- Returns:
- This builder for chaining.
-
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];
- Returns:
- This builder for chaining.
-
hasLazy
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];
- Specified by:
hasLazy
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the lazy field is set.
-
getLazy
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];
- Specified by:
getLazy
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The lazy.
-
setLazy
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];
- Parameters:
value
- The lazy to set.- Returns:
- This builder for chaining.
-
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];
- Returns:
- This builder for chaining.
-
hasDeprecated
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];
- Specified by:
hasDeprecated
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the deprecated field is set.
-
getDeprecated
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];
- Specified by:
getDeprecated
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The deprecated.
-
setDeprecated
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];
- Parameters:
value
- The deprecated to set.- Returns:
- This builder for chaining.
-
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];
- Returns:
- This builder for chaining.
-
hasWeak
public boolean hasWeak()For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
- Specified by:
hasWeak
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- Whether the weak field is set.
-
getWeak
public boolean getWeak()For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
- Specified by:
getWeak
in interfaceDescriptorProtos.FieldOptionsOrBuilder
- Returns:
- The weak.
-
setWeak
For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
- Parameters:
value
- The weak to set.- Returns:
- This builder for chaining.
-
clearWeak
For Google-internal migration only. Do not use.
optional bool weak = 10 [default = false];
- Returns:
- This builder for chaining.
-
getUninterpretedOptionList
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- Specified by:
getUninterpretedOptionList
in interfaceDescriptorProtos.FieldOptionsOrBuilder
-
getUninterpretedOptionCount
public int getUninterpretedOptionCount()The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- Specified by:
getUninterpretedOptionCount
in interfaceDescriptorProtos.FieldOptionsOrBuilder
-
getUninterpretedOption
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- Specified by:
getUninterpretedOption
in interfaceDescriptorProtos.FieldOptionsOrBuilder
-
setUninterpretedOption
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;
-
setUninterpretedOption
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;
-
addUninterpretedOption
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;
-
addUninterpretedOption
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;
-
addUninterpretedOption
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;
-
addUninterpretedOption
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;
-
addAllUninterpretedOption
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;
-
clearUninterpretedOption
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
removeUninterpretedOption
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
getUninterpretedOptionBuilder
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
getUninterpretedOptionOrBuilder
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- Specified by:
getUninterpretedOptionOrBuilder
in interfaceDescriptorProtos.FieldOptionsOrBuilder
-
getUninterpretedOptionOrBuilderList
public List<? extends DescriptorProtos.UninterpretedOptionOrBuilder> getUninterpretedOptionOrBuilderList()The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
- Specified by:
getUninterpretedOptionOrBuilderList
in interfaceDescriptorProtos.FieldOptionsOrBuilder
-
addUninterpretedOptionBuilder
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
addUninterpretedOptionBuilder
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
getUninterpretedOptionBuilderList
The parser stores options it doesn't recognize here. See above.
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
-
setUnknownFields
public final DescriptorProtos.FieldOptions.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
-
mergeUnknownFields
public final DescriptorProtos.FieldOptions.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<DescriptorProtos.FieldOptions.Builder>
-