public static final class DescriptorProtos.FieldOptions extends com.google.protobuf.GeneratedMessage.ExtendableMessage<DescriptorProtos.FieldOptions> implements DescriptorProtos.FieldOptionsOrBuilder
google.protobuf.FieldOptions
Modifier and Type | Class and Description |
---|---|
static class |
DescriptorProtos.FieldOptions.Builder
Protobuf type
google.protobuf.FieldOptions |
static class |
DescriptorProtos.FieldOptions.CType
Protobuf enum
google.protobuf.FieldOptions.CType |
com.google.protobuf.GeneratedMessage.ExtendableMessage.ExtensionWriter
com.google.protobuf.GeneratedMessage.BuilderParent, com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessage.ExtendableBuilder>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessage.ExtendableMessage>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingType extends com.google.protobuf.Message,Type>
Modifier and Type | Field and Description |
---|---|
static int |
CTYPE_FIELD_NUMBER |
static int |
DEPRECATED_FIELD_NUMBER |
static int |
EXPERIMENTAL_MAP_KEY_FIELD_NUMBER |
static int |
LAZY_FIELD_NUMBER |
static int |
PACKED_FIELD_NUMBER |
static com.google.protobuf.Parser<DescriptorProtos.FieldOptions> |
PARSER |
static int |
UNINTERPRETED_OPTION_FIELD_NUMBER |
static int |
WEAK_FIELD_NUMBER |
Modifier and Type | Method and Description |
---|---|
DescriptorProtos.FieldOptions.CType |
getCtype()
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; |
static DescriptorProtos.FieldOptions |
getDefaultInstance() |
DescriptorProtos.FieldOptions |
getDefaultInstanceForType() |
boolean |
getDeprecated()
optional bool deprecated = 3 [default = false]; |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
java.lang.String |
getExperimentalMapKey()
optional string experimental_map_key = 9; |
com.google.protobuf.ByteString |
getExperimentalMapKeyBytes()
optional string experimental_map_key = 9; |
boolean |
getLazy()
optional bool lazy = 5 [default = false]; |
boolean |
getPacked()
optional bool packed = 2; |
com.google.protobuf.Parser<DescriptorProtos.FieldOptions> |
getParserForType() |
int |
getSerializedSize() |
DescriptorProtos.UninterpretedOption |
getUninterpretedOption(int index)
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
int |
getUninterpretedOptionCount()
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
java.util.List<DescriptorProtos.UninterpretedOption> |
getUninterpretedOptionList()
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
DescriptorProtos.UninterpretedOptionOrBuilder |
getUninterpretedOptionOrBuilder(int index)
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
java.util.List<? extends DescriptorProtos.UninterpretedOptionOrBuilder> |
getUninterpretedOptionOrBuilderList()
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999; |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
getWeak()
optional bool weak = 10 [default = false]; |
boolean |
hasCtype()
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING]; |
boolean |
hasDeprecated()
optional bool deprecated = 3 [default = false]; |
boolean |
hasExperimentalMapKey()
optional string experimental_map_key = 9; |
boolean |
hasLazy()
optional bool lazy = 5 [default = false]; |
boolean |
hasPacked()
optional bool packed = 2; |
boolean |
hasWeak()
optional bool weak = 10 [default = false]; |
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static DescriptorProtos.FieldOptions.Builder |
newBuilder() |
static DescriptorProtos.FieldOptions.Builder |
newBuilder(DescriptorProtos.FieldOptions prototype) |
DescriptorProtos.FieldOptions.Builder |
newBuilderForType() |
protected DescriptorProtos.FieldOptions.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) |
static DescriptorProtos.FieldOptions |
parseDelimitedFrom(java.io.InputStream input) |
static DescriptorProtos.FieldOptions |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DescriptorProtos.FieldOptions |
parseFrom(byte[] data) |
static DescriptorProtos.FieldOptions |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DescriptorProtos.FieldOptions |
parseFrom(com.google.protobuf.ByteString data) |
static DescriptorProtos.FieldOptions |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DescriptorProtos.FieldOptions |
parseFrom(com.google.protobuf.CodedInputStream input) |
static DescriptorProtos.FieldOptions |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DescriptorProtos.FieldOptions |
parseFrom(java.io.InputStream input) |
static DescriptorProtos.FieldOptions |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
DescriptorProtos.FieldOptions.Builder |
toBuilder() |
protected java.lang.Object |
writeReplace() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
extensionsAreInitialized, extensionsSerializedSize, extensionsSerializedSizeAsMessageSet, getAllFields, getExtension, getExtension, getExtensionCount, getExtensionFields, getField, getRepeatedField, getRepeatedFieldCount, hasExtension, hasField, makeExtensionsImmutable, newExtensionWriter, newMessageSetExtensionWriter, parseUnknownField
getDescriptorForType, getOneofFieldDescriptor, hasOneof, newFileScopedGeneratedExtension, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, newMessageScopedGeneratedExtension
equals, findInitializationErrors, getInitializationErrorString, hashCode, hashFields, toString
checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getExtension, getExtension, getExtensionCount, hasExtension
public static com.google.protobuf.Parser<DescriptorProtos.FieldOptions> PARSER
public static final int CTYPE_FIELD_NUMBER
public static final int PACKED_FIELD_NUMBER
public static final int LAZY_FIELD_NUMBER
public static final int DEPRECATED_FIELD_NUMBER
public static final int EXPERIMENTAL_MAP_KEY_FIELD_NUMBER
public static final int WEAK_FIELD_NUMBER
public static final int UNINTERPRETED_OPTION_FIELD_NUMBER
public static DescriptorProtos.FieldOptions getDefaultInstance()
public DescriptorProtos.FieldOptions getDefaultInstanceForType()
getDefaultInstanceForType
in interface com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<DescriptorProtos.FieldOptions>
getDefaultInstanceForType
in interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType
in interface com.google.protobuf.MessageOrBuilder
public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields
in interface com.google.protobuf.MessageOrBuilder
getUnknownFields
in class com.google.protobuf.GeneratedMessage
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable
in class com.google.protobuf.GeneratedMessage
public com.google.protobuf.Parser<DescriptorProtos.FieldOptions> getParserForType()
getParserForType
in interface com.google.protobuf.Message
getParserForType
in interface com.google.protobuf.MessageLite
getParserForType
in class com.google.protobuf.GeneratedMessage
public boolean hasCtype()
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
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!
hasCtype
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.FieldOptions.CType getCtype()
optional .google.protobuf.FieldOptions.CType ctype = 1 [default = STRING];
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!
getCtype
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean hasPacked()
optional bool packed = 2;
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.
hasPacked
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean getPacked()
optional bool packed = 2;
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.
getPacked
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean hasLazy()
optional bool lazy = 5 [default = false];
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 outher 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.
hasLazy
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean getLazy()
optional bool lazy = 5 [default = false];
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 outher 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.
getLazy
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean hasDeprecated()
optional bool deprecated = 3 [default = false];
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.
hasDeprecated
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean getDeprecated()
optional bool deprecated = 3 [default = false];
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.
getDeprecated
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean hasExperimentalMapKey()
optional string experimental_map_key = 9;
EXPERIMENTAL. DO NOT USE. For "map" fields, the name of the field in the enclosed type that is the key for this map. For example, suppose we have: message Item { required string name = 1; required string value = 2; } message Config { repeated Item items = 1 [experimental_map_key="name"]; } In this situation, the map key for Item will be set to "name". TODO: Fully-implement this, then remove the "experimental_" prefix.
hasExperimentalMapKey
in interface DescriptorProtos.FieldOptionsOrBuilder
public java.lang.String getExperimentalMapKey()
optional string experimental_map_key = 9;
EXPERIMENTAL. DO NOT USE. For "map" fields, the name of the field in the enclosed type that is the key for this map. For example, suppose we have: message Item { required string name = 1; required string value = 2; } message Config { repeated Item items = 1 [experimental_map_key="name"]; } In this situation, the map key for Item will be set to "name". TODO: Fully-implement this, then remove the "experimental_" prefix.
getExperimentalMapKey
in interface DescriptorProtos.FieldOptionsOrBuilder
public com.google.protobuf.ByteString getExperimentalMapKeyBytes()
optional string experimental_map_key = 9;
EXPERIMENTAL. DO NOT USE. For "map" fields, the name of the field in the enclosed type that is the key for this map. For example, suppose we have: message Item { required string name = 1; required string value = 2; } message Config { repeated Item items = 1 [experimental_map_key="name"]; } In this situation, the map key for Item will be set to "name". TODO: Fully-implement this, then remove the "experimental_" prefix.
getExperimentalMapKeyBytes
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean hasWeak()
optional bool weak = 10 [default = false];
For Google-internal migration only. Do not use.
hasWeak
in interface DescriptorProtos.FieldOptionsOrBuilder
public boolean getWeak()
optional bool weak = 10 [default = false];
For Google-internal migration only. Do not use.
getWeak
in interface DescriptorProtos.FieldOptionsOrBuilder
public java.util.List<DescriptorProtos.UninterpretedOption> getUninterpretedOptionList()
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
The parser stores options it doesn't recognize here. See above.
getUninterpretedOptionList
in interface DescriptorProtos.FieldOptionsOrBuilder
public java.util.List<? extends DescriptorProtos.UninterpretedOptionOrBuilder> getUninterpretedOptionOrBuilderList()
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
The parser stores options it doesn't recognize here. See above.
getUninterpretedOptionOrBuilderList
in interface DescriptorProtos.FieldOptionsOrBuilder
public int getUninterpretedOptionCount()
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
The parser stores options it doesn't recognize here. See above.
getUninterpretedOptionCount
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.UninterpretedOption getUninterpretedOption(int index)
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
The parser stores options it doesn't recognize here. See above.
getUninterpretedOption
in interface DescriptorProtos.FieldOptionsOrBuilder
public DescriptorProtos.UninterpretedOptionOrBuilder getUninterpretedOptionOrBuilder(int index)
repeated .google.protobuf.UninterpretedOption uninterpreted_option = 999;
The parser stores options it doesn't recognize here. See above.
getUninterpretedOptionOrBuilder
in interface DescriptorProtos.FieldOptionsOrBuilder
public final boolean isInitialized()
isInitialized
in interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
in class com.google.protobuf.GeneratedMessage.ExtendableMessage<DescriptorProtos.FieldOptions>
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException
writeTo
in interface com.google.protobuf.MessageLite
writeTo
in class com.google.protobuf.AbstractMessage
java.io.IOException
public int getSerializedSize()
getSerializedSize
in interface com.google.protobuf.MessageLite
getSerializedSize
in class com.google.protobuf.AbstractMessage
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException
writeReplace
in class com.google.protobuf.GeneratedMessage
java.io.ObjectStreamException
public static DescriptorProtos.FieldOptions parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static DescriptorProtos.FieldOptions parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static DescriptorProtos.FieldOptions parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static DescriptorProtos.FieldOptions parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferException
public static DescriptorProtos.FieldOptions parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static DescriptorProtos.FieldOptions parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static DescriptorProtos.FieldOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static DescriptorProtos.FieldOptions parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static DescriptorProtos.FieldOptions parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOException
public static DescriptorProtos.FieldOptions parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static DescriptorProtos.FieldOptions.Builder newBuilder()
public DescriptorProtos.FieldOptions.Builder newBuilderForType()
newBuilderForType
in interface com.google.protobuf.Message
newBuilderForType
in interface com.google.protobuf.MessageLite
public static DescriptorProtos.FieldOptions.Builder newBuilder(DescriptorProtos.FieldOptions prototype)
public DescriptorProtos.FieldOptions.Builder toBuilder()
toBuilder
in interface com.google.protobuf.Message
toBuilder
in interface com.google.protobuf.MessageLite
protected DescriptorProtos.FieldOptions.Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
newBuilderForType
in class com.google.protobuf.GeneratedMessage