public static final class DescriptorProtos.FieldDescriptorProto extends com.google.protobuf.GeneratedMessage implements DescriptorProtos.FieldDescriptorProtoOrBuilder
google.protobuf.FieldDescriptorProto
Describes a field within a message.
| Modifier and Type | Class and Description |
|---|---|
static class |
DescriptorProtos.FieldDescriptorProto.Builder
Protobuf type
google.protobuf.FieldDescriptorProto |
static class |
DescriptorProtos.FieldDescriptorProto.Label
Protobuf enum
google.protobuf.FieldDescriptorProto.Label |
static class |
DescriptorProtos.FieldDescriptorProto.Type
Protobuf enum
google.protobuf.FieldDescriptorProto.Type |
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 |
DEFAULT_VALUE_FIELD_NUMBER |
static int |
EXTENDEE_FIELD_NUMBER |
static int |
LABEL_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
NUMBER_FIELD_NUMBER |
static int |
ONEOF_INDEX_FIELD_NUMBER |
static int |
OPTIONS_FIELD_NUMBER |
static com.google.protobuf.Parser<DescriptorProtos.FieldDescriptorProto> |
PARSER |
static int |
TYPE_FIELD_NUMBER |
static int |
TYPE_NAME_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
static DescriptorProtos.FieldDescriptorProto |
getDefaultInstance() |
DescriptorProtos.FieldDescriptorProto |
getDefaultInstanceForType() |
java.lang.String |
getDefaultValue()
optional string default_value = 7; |
com.google.protobuf.ByteString |
getDefaultValueBytes()
optional string default_value = 7; |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
java.lang.String |
getExtendee()
optional string extendee = 2; |
com.google.protobuf.ByteString |
getExtendeeBytes()
optional string extendee = 2; |
DescriptorProtos.FieldDescriptorProto.Label |
getLabel()
optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
java.lang.String |
getName()
optional string name = 1; |
com.google.protobuf.ByteString |
getNameBytes()
optional string name = 1; |
int |
getNumber()
optional int32 number = 3; |
int |
getOneofIndex()
optional int32 oneof_index = 9; |
DescriptorProtos.FieldOptions |
getOptions()
optional .google.protobuf.FieldOptions options = 8; |
DescriptorProtos.FieldOptionsOrBuilder |
getOptionsOrBuilder()
optional .google.protobuf.FieldOptions options = 8; |
com.google.protobuf.Parser<DescriptorProtos.FieldDescriptorProto> |
getParserForType() |
int |
getSerializedSize() |
DescriptorProtos.FieldDescriptorProto.Type |
getType()
optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
java.lang.String |
getTypeName()
optional string type_name = 6; |
com.google.protobuf.ByteString |
getTypeNameBytes()
optional string type_name = 6; |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
boolean |
hasDefaultValue()
optional string default_value = 7; |
boolean |
hasExtendee()
optional string extendee = 2; |
boolean |
hasLabel()
optional .google.protobuf.FieldDescriptorProto.Label label = 4; |
boolean |
hasName()
optional string name = 1; |
boolean |
hasNumber()
optional int32 number = 3; |
boolean |
hasOneofIndex()
optional int32 oneof_index = 9; |
boolean |
hasOptions()
optional .google.protobuf.FieldOptions options = 8; |
boolean |
hasType()
optional .google.protobuf.FieldDescriptorProto.Type type = 5; |
boolean |
hasTypeName()
optional string type_name = 6; |
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static DescriptorProtos.FieldDescriptorProto.Builder |
newBuilder() |
static DescriptorProtos.FieldDescriptorProto.Builder |
newBuilder(DescriptorProtos.FieldDescriptorProto prototype) |
DescriptorProtos.FieldDescriptorProto.Builder |
newBuilderForType() |
protected DescriptorProtos.FieldDescriptorProto.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) |
static DescriptorProtos.FieldDescriptorProto |
parseDelimitedFrom(java.io.InputStream input) |
static DescriptorProtos.FieldDescriptorProto |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DescriptorProtos.FieldDescriptorProto |
parseFrom(byte[] data) |
static DescriptorProtos.FieldDescriptorProto |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DescriptorProtos.FieldDescriptorProto |
parseFrom(com.google.protobuf.ByteString data) |
static DescriptorProtos.FieldDescriptorProto |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DescriptorProtos.FieldDescriptorProto |
parseFrom(com.google.protobuf.CodedInputStream input) |
static DescriptorProtos.FieldDescriptorProto |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static DescriptorProtos.FieldDescriptorProto |
parseFrom(java.io.InputStream input) |
static DescriptorProtos.FieldDescriptorProto |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
DescriptorProtos.FieldDescriptorProto.Builder |
toBuilder() |
protected java.lang.Object |
writeReplace() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, makeExtensionsImmutable, newFileScopedGeneratedExtension, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, newMessageScopedGeneratedExtension, parseUnknownFieldequals, findInitializationErrors, getInitializationErrorString, hashCode, hashFields, toStringcheckByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static com.google.protobuf.Parser<DescriptorProtos.FieldDescriptorProto> PARSER
public static final int NAME_FIELD_NUMBER
public static final int NUMBER_FIELD_NUMBER
public static final int LABEL_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
public static final int TYPE_NAME_FIELD_NUMBER
public static final int EXTENDEE_FIELD_NUMBER
public static final int DEFAULT_VALUE_FIELD_NUMBER
public static final int ONEOF_INDEX_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER
public static DescriptorProtos.FieldDescriptorProto getDefaultInstance()
public DescriptorProtos.FieldDescriptorProto getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessagepublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessagepublic com.google.protobuf.Parser<DescriptorProtos.FieldDescriptorProto> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessagepublic boolean hasName()
optional string name = 1;hasName in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic java.lang.String getName()
optional string name = 1;getName in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
optional string name = 1;getNameBytes in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic boolean hasNumber()
optional int32 number = 3;hasNumber in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic int getNumber()
optional int32 number = 3;getNumber in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic boolean hasLabel()
optional .google.protobuf.FieldDescriptorProto.Label label = 4;hasLabel in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic DescriptorProtos.FieldDescriptorProto.Label getLabel()
optional .google.protobuf.FieldDescriptorProto.Label label = 4;getLabel in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic boolean hasType()
optional .google.protobuf.FieldDescriptorProto.Type type = 5;
If type_name is set, this need not be set. If both this and type_name are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
hasType in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic DescriptorProtos.FieldDescriptorProto.Type getType()
optional .google.protobuf.FieldDescriptorProto.Type type = 5;
If type_name is set, this need not be set. If both this and type_name are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
getType in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic boolean hasTypeName()
optional string type_name = 6;
For message and enum types, this is the name of the type. If the name starts with a '.', it is fully-qualified. Otherwise, C++-like scoping rules are used to find the type (i.e. first the nested types within this message are searched, then within the parent, on up to the root namespace).
hasTypeName in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic java.lang.String getTypeName()
optional string type_name = 6;
For message and enum types, this is the name of the type. If the name starts with a '.', it is fully-qualified. Otherwise, C++-like scoping rules are used to find the type (i.e. first the nested types within this message are searched, then within the parent, on up to the root namespace).
getTypeName in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic com.google.protobuf.ByteString getTypeNameBytes()
optional string type_name = 6;
For message and enum types, this is the name of the type. If the name starts with a '.', it is fully-qualified. Otherwise, C++-like scoping rules are used to find the type (i.e. first the nested types within this message are searched, then within the parent, on up to the root namespace).
getTypeNameBytes in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic boolean hasExtendee()
optional string extendee = 2;
For extensions, this is the name of the type being extended. It is resolved in the same manner as type_name.
hasExtendee in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic java.lang.String getExtendee()
optional string extendee = 2;
For extensions, this is the name of the type being extended. It is resolved in the same manner as type_name.
getExtendee in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic com.google.protobuf.ByteString getExtendeeBytes()
optional string extendee = 2;
For extensions, this is the name of the type being extended. It is resolved in the same manner as type_name.
getExtendeeBytes in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic boolean hasDefaultValue()
optional string default_value = 7;
For numeric types, contains the original text representation of the value. For booleans, "true" or "false". For strings, contains the default text contents (not escaped in any way). For bytes, contains the C escaped value. All bytes >= 128 are escaped. TODO(kenton): Base-64 encode?
hasDefaultValue in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic java.lang.String getDefaultValue()
optional string default_value = 7;
For numeric types, contains the original text representation of the value. For booleans, "true" or "false". For strings, contains the default text contents (not escaped in any way). For bytes, contains the C escaped value. All bytes >= 128 are escaped. TODO(kenton): Base-64 encode?
getDefaultValue in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic com.google.protobuf.ByteString getDefaultValueBytes()
optional string default_value = 7;
For numeric types, contains the original text representation of the value. For booleans, "true" or "false". For strings, contains the default text contents (not escaped in any way). For bytes, contains the C escaped value. All bytes >= 128 are escaped. TODO(kenton): Base-64 encode?
getDefaultValueBytes in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic boolean hasOneofIndex()
optional int32 oneof_index = 9;
If set, gives the index of a oneof in the containing type's oneof_decl list. This field is a member of that oneof. Extensions of a oneof should not set this since the oneof to which they belong will be inferred based on the extension range containing the extension's field number.
hasOneofIndex in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic int getOneofIndex()
optional int32 oneof_index = 9;
If set, gives the index of a oneof in the containing type's oneof_decl list. This field is a member of that oneof. Extensions of a oneof should not set this since the oneof to which they belong will be inferred based on the extension range containing the extension's field number.
getOneofIndex in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic boolean hasOptions()
optional .google.protobuf.FieldOptions options = 8;hasOptions in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic DescriptorProtos.FieldOptions getOptions()
optional .google.protobuf.FieldOptions options = 8;getOptions in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic DescriptorProtos.FieldOptionsOrBuilder getOptionsOrBuilder()
optional .google.protobuf.FieldOptions options = 8;getOptionsOrBuilder in interface DescriptorProtos.FieldDescriptorProtoOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessagepublic void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.AbstractMessagejava.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.AbstractMessageprotected java.lang.Object writeReplace()
throws java.io.ObjectStreamException
writeReplace in class com.google.protobuf.GeneratedMessagejava.io.ObjectStreamExceptionpublic static DescriptorProtos.FieldDescriptorProto parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DescriptorProtos.FieldDescriptorProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DescriptorProtos.FieldDescriptorProto parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DescriptorProtos.FieldDescriptorProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static DescriptorProtos.FieldDescriptorProto parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static DescriptorProtos.FieldDescriptorProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static DescriptorProtos.FieldDescriptorProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static DescriptorProtos.FieldDescriptorProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static DescriptorProtos.FieldDescriptorProto parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static DescriptorProtos.FieldDescriptorProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static DescriptorProtos.FieldDescriptorProto.Builder newBuilder()
public DescriptorProtos.FieldDescriptorProto.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static DescriptorProtos.FieldDescriptorProto.Builder newBuilder(DescriptorProtos.FieldDescriptorProto prototype)
public DescriptorProtos.FieldDescriptorProto.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected DescriptorProtos.FieldDescriptorProto.Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessage