public static final class DescriptorProtos.FileDescriptorProto extends GeneratedMessage implements DescriptorProtos.FileDescriptorProtoOrBuilder
google.protobuf.FileDescriptorProto
Describes a complete .proto file.
| Modifier and Type | Class and Description |
|---|---|
static class |
DescriptorProtos.FileDescriptorProto.Builder
Protobuf type
google.protobuf.FileDescriptorProto |
GeneratedMessage.ExtendableBuilder<MessageType extends GeneratedMessage.ExtendableMessage,BuilderType extends GeneratedMessage.ExtendableBuilder>, GeneratedMessage.ExtendableMessage<MessageType extends GeneratedMessage.ExtendableMessage>, GeneratedMessage.ExtendableMessageOrBuilder<MessageType extends GeneratedMessage.ExtendableMessage>, GeneratedMessage.FieldAccessorTable, GeneratedMessage.GeneratedExtension<ContainingType extends Message,Type>| Modifier and Type | Field and Description |
|---|---|
static int |
DEPENDENCY_FIELD_NUMBER |
static int |
ENUM_TYPE_FIELD_NUMBER |
static int |
EXTENSION_FIELD_NUMBER |
static int |
MESSAGE_TYPE_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
OPTIONS_FIELD_NUMBER |
static int |
PACKAGE_FIELD_NUMBER |
static Parser<DescriptorProtos.FileDescriptorProto> |
PARSER |
static int |
PUBLIC_DEPENDENCY_FIELD_NUMBER |
static int |
SERVICE_FIELD_NUMBER |
static int |
SOURCE_CODE_INFO_FIELD_NUMBER |
static int |
WEAK_DEPENDENCY_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
static DescriptorProtos.FileDescriptorProto |
getDefaultInstance() |
DescriptorProtos.FileDescriptorProto |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
java.lang.String |
getDependency(int index)
repeated string dependency = 3; |
ByteString |
getDependencyBytes(int index)
repeated string dependency = 3; |
int |
getDependencyCount()
repeated string dependency = 3; |
java.util.List<java.lang.String> |
getDependencyList()
repeated string dependency = 3; |
static Descriptors.Descriptor |
getDescriptor() |
DescriptorProtos.EnumDescriptorProto |
getEnumType(int index)
repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
int |
getEnumTypeCount()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
java.util.List<DescriptorProtos.EnumDescriptorProto> |
getEnumTypeList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
DescriptorProtos.EnumDescriptorProtoOrBuilder |
getEnumTypeOrBuilder(int index)
repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
java.util.List<? extends DescriptorProtos.EnumDescriptorProtoOrBuilder> |
getEnumTypeOrBuilderList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
DescriptorProtos.FieldDescriptorProto |
getExtension(int index)
repeated .google.protobuf.FieldDescriptorProto extension = 7; |
int |
getExtensionCount()
repeated .google.protobuf.FieldDescriptorProto extension = 7; |
java.util.List<DescriptorProtos.FieldDescriptorProto> |
getExtensionList()
repeated .google.protobuf.FieldDescriptorProto extension = 7; |
DescriptorProtos.FieldDescriptorProtoOrBuilder |
getExtensionOrBuilder(int index)
repeated .google.protobuf.FieldDescriptorProto extension = 7; |
java.util.List<? extends DescriptorProtos.FieldDescriptorProtoOrBuilder> |
getExtensionOrBuilderList()
repeated .google.protobuf.FieldDescriptorProto extension = 7; |
DescriptorProtos.DescriptorProto |
getMessageType(int index)
repeated .google.protobuf.DescriptorProto message_type = 4; |
int |
getMessageTypeCount()
repeated .google.protobuf.DescriptorProto message_type = 4; |
java.util.List<DescriptorProtos.DescriptorProto> |
getMessageTypeList()
repeated .google.protobuf.DescriptorProto message_type = 4; |
DescriptorProtos.DescriptorProtoOrBuilder |
getMessageTypeOrBuilder(int index)
repeated .google.protobuf.DescriptorProto message_type = 4; |
java.util.List<? extends DescriptorProtos.DescriptorProtoOrBuilder> |
getMessageTypeOrBuilderList()
repeated .google.protobuf.DescriptorProto message_type = 4; |
java.lang.String |
getName()
optional string name = 1; |
ByteString |
getNameBytes()
optional string name = 1; |
DescriptorProtos.FileOptions |
getOptions()
optional .google.protobuf.FileOptions options = 8; |
DescriptorProtos.FileOptionsOrBuilder |
getOptionsOrBuilder()
optional .google.protobuf.FileOptions options = 8; |
java.lang.String |
getPackage()
optional string package = 2; |
ByteString |
getPackageBytes()
optional string package = 2; |
Parser<DescriptorProtos.FileDescriptorProto> |
getParserForType()
Gets the parser for a message of the same type as this message.
|
int |
getPublicDependency(int index)
repeated int32 public_dependency = 10; |
int |
getPublicDependencyCount()
repeated int32 public_dependency = 10; |
java.util.List<java.lang.Integer> |
getPublicDependencyList()
repeated int32 public_dependency = 10; |
int |
getSerializedSize()
Get the number of bytes required to encode this message.
|
DescriptorProtos.ServiceDescriptorProto |
getService(int index)
repeated .google.protobuf.ServiceDescriptorProto service = 6; |
int |
getServiceCount()
repeated .google.protobuf.ServiceDescriptorProto service = 6; |
java.util.List<DescriptorProtos.ServiceDescriptorProto> |
getServiceList()
repeated .google.protobuf.ServiceDescriptorProto service = 6; |
DescriptorProtos.ServiceDescriptorProtoOrBuilder |
getServiceOrBuilder(int index)
repeated .google.protobuf.ServiceDescriptorProto service = 6; |
java.util.List<? extends DescriptorProtos.ServiceDescriptorProtoOrBuilder> |
getServiceOrBuilderList()
repeated .google.protobuf.ServiceDescriptorProto service = 6; |
DescriptorProtos.SourceCodeInfo |
getSourceCodeInfo()
optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
DescriptorProtos.SourceCodeInfoOrBuilder |
getSourceCodeInfoOrBuilder()
optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
UnknownFieldSet |
getUnknownFields()
Get the
UnknownFieldSet for this message. |
int |
getWeakDependency(int index)
repeated int32 weak_dependency = 11; |
int |
getWeakDependencyCount()
repeated int32 weak_dependency = 11; |
java.util.List<java.lang.Integer> |
getWeakDependencyList()
repeated int32 weak_dependency = 11; |
boolean |
hasName()
optional string name = 1; |
boolean |
hasOptions()
optional .google.protobuf.FileOptions options = 8; |
boolean |
hasPackage()
optional string package = 2; |
boolean |
hasSourceCodeInfo()
optional .google.protobuf.SourceCodeInfo source_code_info = 9; |
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded
messages are set, false otherwise.
|
static DescriptorProtos.FileDescriptorProto.Builder |
newBuilder() |
static DescriptorProtos.FileDescriptorProto.Builder |
newBuilder(DescriptorProtos.FileDescriptorProto prototype) |
DescriptorProtos.FileDescriptorProto.Builder |
newBuilderForType()
Constructs a new builder for a message of the same type as this message.
|
static DescriptorProtos.FileDescriptorProto |
parseDelimitedFrom(java.io.InputStream input) |
static DescriptorProtos.FileDescriptorProto |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static DescriptorProtos.FileDescriptorProto |
parseFrom(byte[] data) |
static DescriptorProtos.FileDescriptorProto |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static DescriptorProtos.FileDescriptorProto |
parseFrom(ByteString data) |
static DescriptorProtos.FileDescriptorProto |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static DescriptorProtos.FileDescriptorProto |
parseFrom(CodedInputStream input) |
static DescriptorProtos.FileDescriptorProto |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static DescriptorProtos.FileDescriptorProto |
parseFrom(java.io.InputStream input) |
static DescriptorProtos.FileDescriptorProto |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
DescriptorProtos.FileDescriptorProto.Builder |
toBuilder()
Constructs a builder initialized with the current message.
|
void |
writeTo(CodedOutputStream output)
Serializes the message and writes it to
output. |
getAllFields, getDescriptorForType, getField, getRepeatedField, getRepeatedFieldCount, hasField, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtensionequals, findInitializationErrors, getInitializationErrorString, hashCode, toStringtoByteArray, toByteString, writeDelimitedTo, writeTofindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getRepeatedField, getRepeatedFieldCount, hasFieldtoByteArray, toByteString, writeDelimitedTo, writeTopublic static Parser<DescriptorProtos.FileDescriptorProto> PARSER
public static final int NAME_FIELD_NUMBER
public static final int PACKAGE_FIELD_NUMBER
public static final int DEPENDENCY_FIELD_NUMBER
public static final int PUBLIC_DEPENDENCY_FIELD_NUMBER
public static final int WEAK_DEPENDENCY_FIELD_NUMBER
public static final int MESSAGE_TYPE_FIELD_NUMBER
public static final int ENUM_TYPE_FIELD_NUMBER
public static final int SERVICE_FIELD_NUMBER
public static final int EXTENSION_FIELD_NUMBER
public static final int OPTIONS_FIELD_NUMBER
public static final int SOURCE_CODE_INFO_FIELD_NUMBER
public static DescriptorProtos.FileDescriptorProto getDefaultInstance()
public DescriptorProtos.FileDescriptorProto getDefaultInstanceForType()
MessageLiteOrBuildergetDefaultInstance() 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 MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilderpublic final UnknownFieldSet getUnknownFields()
MessageOrBuilderUnknownFieldSet for this message.getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessagepublic static final Descriptors.Descriptor getDescriptor()
public Parser<DescriptorProtos.FileDescriptorProto> getParserForType()
MessageLitegetParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessagepublic boolean hasName()
optional string name = 1;
file name, relative to root of source tree
hasName in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.lang.String getName()
optional string name = 1;
file name, relative to root of source tree
getName in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic ByteString getNameBytes()
optional string name = 1;
file name, relative to root of source tree
getNameBytes in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic boolean hasPackage()
optional string package = 2;
e.g. "foo", "foo.bar", etc.
hasPackage in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.lang.String getPackage()
optional string package = 2;
e.g. "foo", "foo.bar", etc.
getPackage in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic ByteString getPackageBytes()
optional string package = 2;
e.g. "foo", "foo.bar", etc.
getPackageBytes in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.util.List<java.lang.String> getDependencyList()
repeated string dependency = 3;
Names of files imported by this file.
getDependencyList in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic int getDependencyCount()
repeated string dependency = 3;
Names of files imported by this file.
getDependencyCount in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.lang.String getDependency(int index)
repeated string dependency = 3;
Names of files imported by this file.
getDependency in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic ByteString getDependencyBytes(int index)
repeated string dependency = 3;
Names of files imported by this file.
getDependencyBytes in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.util.List<java.lang.Integer> getPublicDependencyList()
repeated int32 public_dependency = 10;
Indexes of the public imported files in the dependency list above.
getPublicDependencyList in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic int getPublicDependencyCount()
repeated int32 public_dependency = 10;
Indexes of the public imported files in the dependency list above.
getPublicDependencyCount in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic int getPublicDependency(int index)
repeated int32 public_dependency = 10;
Indexes of the public imported files in the dependency list above.
getPublicDependency in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.util.List<java.lang.Integer> getWeakDependencyList()
repeated int32 weak_dependency = 11;
Indexes of the weak imported files in the dependency list. For Google-internal migration only. Do not use.
getWeakDependencyList in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic int getWeakDependencyCount()
repeated int32 weak_dependency = 11;
Indexes of the weak imported files in the dependency list. For Google-internal migration only. Do not use.
getWeakDependencyCount in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic int getWeakDependency(int index)
repeated int32 weak_dependency = 11;
Indexes of the weak imported files in the dependency list. For Google-internal migration only. Do not use.
getWeakDependency in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.util.List<DescriptorProtos.DescriptorProto> getMessageTypeList()
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
getMessageTypeList in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.util.List<? extends DescriptorProtos.DescriptorProtoOrBuilder> getMessageTypeOrBuilderList()
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
getMessageTypeOrBuilderList in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic int getMessageTypeCount()
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
getMessageTypeCount in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic DescriptorProtos.DescriptorProto getMessageType(int index)
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
getMessageType in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic DescriptorProtos.DescriptorProtoOrBuilder getMessageTypeOrBuilder(int index)
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
getMessageTypeOrBuilder in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.util.List<DescriptorProtos.EnumDescriptorProto> getEnumTypeList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;getEnumTypeList in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.util.List<? extends DescriptorProtos.EnumDescriptorProtoOrBuilder> getEnumTypeOrBuilderList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;getEnumTypeOrBuilderList in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic int getEnumTypeCount()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;getEnumTypeCount in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic DescriptorProtos.EnumDescriptorProto getEnumType(int index)
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;getEnumType in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic DescriptorProtos.EnumDescriptorProtoOrBuilder getEnumTypeOrBuilder(int index)
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;getEnumTypeOrBuilder in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.util.List<DescriptorProtos.ServiceDescriptorProto> getServiceList()
repeated .google.protobuf.ServiceDescriptorProto service = 6;getServiceList in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.util.List<? extends DescriptorProtos.ServiceDescriptorProtoOrBuilder> getServiceOrBuilderList()
repeated .google.protobuf.ServiceDescriptorProto service = 6;getServiceOrBuilderList in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic int getServiceCount()
repeated .google.protobuf.ServiceDescriptorProto service = 6;getServiceCount in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic DescriptorProtos.ServiceDescriptorProto getService(int index)
repeated .google.protobuf.ServiceDescriptorProto service = 6;getService in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic DescriptorProtos.ServiceDescriptorProtoOrBuilder getServiceOrBuilder(int index)
repeated .google.protobuf.ServiceDescriptorProto service = 6;getServiceOrBuilder in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.util.List<DescriptorProtos.FieldDescriptorProto> getExtensionList()
repeated .google.protobuf.FieldDescriptorProto extension = 7;getExtensionList in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic java.util.List<? extends DescriptorProtos.FieldDescriptorProtoOrBuilder> getExtensionOrBuilderList()
repeated .google.protobuf.FieldDescriptorProto extension = 7;getExtensionOrBuilderList in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic int getExtensionCount()
repeated .google.protobuf.FieldDescriptorProto extension = 7;getExtensionCount in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic DescriptorProtos.FieldDescriptorProto getExtension(int index)
repeated .google.protobuf.FieldDescriptorProto extension = 7;getExtension in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic DescriptorProtos.FieldDescriptorProtoOrBuilder getExtensionOrBuilder(int index)
repeated .google.protobuf.FieldDescriptorProto extension = 7;getExtensionOrBuilder in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic boolean hasOptions()
optional .google.protobuf.FileOptions options = 8;hasOptions in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic DescriptorProtos.FileOptions getOptions()
optional .google.protobuf.FileOptions options = 8;getOptions in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic DescriptorProtos.FileOptionsOrBuilder getOptionsOrBuilder()
optional .google.protobuf.FileOptions options = 8;getOptionsOrBuilder in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic boolean hasSourceCodeInfo()
optional .google.protobuf.SourceCodeInfo source_code_info = 9;
This field contains optional information about the original source code. You may safely remove this entire field whithout harming runtime functionality of the descriptors -- the information is needed only by development tools.
hasSourceCodeInfo in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic DescriptorProtos.SourceCodeInfo getSourceCodeInfo()
optional .google.protobuf.SourceCodeInfo source_code_info = 9;
This field contains optional information about the original source code. You may safely remove this entire field whithout harming runtime functionality of the descriptors -- the information is needed only by development tools.
getSourceCodeInfo in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic DescriptorProtos.SourceCodeInfoOrBuilder getSourceCodeInfoOrBuilder()
optional .google.protobuf.SourceCodeInfo source_code_info = 9;
This field contains optional information about the original source code. You may safely remove this entire field whithout harming runtime functionality of the descriptors -- the information is needed only by development tools.
getSourceCodeInfoOrBuilder in interface DescriptorProtos.FileDescriptorProtoOrBuilderpublic final boolean isInitialized()
MessageLiteOrBuilderisInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessagepublic void writeTo(CodedOutputStream output) throws java.io.IOException
MessageLiteoutput. This does not
flush or close the stream.writeTo in interface MessageLitewriteTo in class AbstractMessagejava.io.IOExceptionpublic int getSerializedSize()
MessageLitegetSerializedSize in interface MessageLitegetSerializedSize in class AbstractMessagepublic static DescriptorProtos.FileDescriptorProto parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static DescriptorProtos.FileDescriptorProto parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static DescriptorProtos.FileDescriptorProto parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static DescriptorProtos.FileDescriptorProto parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static DescriptorProtos.FileDescriptorProto parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static DescriptorProtos.FileDescriptorProto parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static DescriptorProtos.FileDescriptorProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static DescriptorProtos.FileDescriptorProto parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static DescriptorProtos.FileDescriptorProto parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static DescriptorProtos.FileDescriptorProto parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static DescriptorProtos.FileDescriptorProto.Builder newBuilder()
public DescriptorProtos.FileDescriptorProto.Builder newBuilderForType()
MessageLitenewBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static DescriptorProtos.FileDescriptorProto.Builder newBuilder(DescriptorProtos.FileDescriptorProto prototype)
public DescriptorProtos.FileDescriptorProto.Builder toBuilder()
MessageLitetoBuilder in interface MessagetoBuilder in interface MessageLite