public static final class DescriptorProtos.FileDescriptorProto extends GeneratedMessageimplements DescriptorProtos .FileDescriptorProtoOrBuilder
google.protobuf.FileDescriptorProto
Describes a complete .proto file.
| Modifier and Type | Class and Description |
|---|---|
static class |
DescriptorProtos
Protobuf type
google.protobuf.FileDescriptorProto
|
GeneratedMessage.BuilderParent , 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 |
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
|
alwaysUseFieldBuildersmemoizedHashCode| Modifier and Type | Method and Description |
|---|---|
static DescriptorProtos |
getDefaultInstance()
|
DescriptorProtos |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
String |
getDependency(int index)
repeated string dependency = 3;
|
ByteString |
getDependencyBytes(int index)
repeated string dependency = 3;
|
int |
getDependencyCount()
repeated string dependency = 3;
|
ProtocolStringList |
getDependencyList()
repeated string dependency = 3;
|
static Descriptors |
getDescriptor()
|
DescriptorProtos |
getEnumType(int index)
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
|
int |
getEnumTypeCount()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
|
List |
getEnumTypeList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
|
DescriptorProtos |
getEnumTypeOrBuilder(int index)
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
|
List |
getEnumTypeOrBuilderList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
|
DescriptorProtos |
getExtension(int index)
repeated .google.protobuf.FieldDescriptorProto extension = 7;
|
int |
getExtensionCount()
repeated .google.protobuf.FieldDescriptorProto extension = 7;
|
List |
getExtensionList()
repeated .google.protobuf.FieldDescriptorProto extension = 7;
|
DescriptorProtos |
getExtensionOrBuilder(int index)
repeated .google.protobuf.FieldDescriptorProto extension = 7;
|
List |
getExtensionOrBuilderList()
repeated .google.protobuf.FieldDescriptorProto extension = 7;
|
DescriptorProtos |
getMessageType(int index)
repeated .google.protobuf.DescriptorProto message_type = 4;
|
int |
getMessageTypeCount()
repeated .google.protobuf.DescriptorProto message_type = 4;
|
List |
getMessageTypeList()
repeated .google.protobuf.DescriptorProto message_type = 4;
|
DescriptorProtos |
getMessageTypeOrBuilder(int index)
repeated .google.protobuf.DescriptorProto message_type = 4;
|
List |
getMessageTypeOrBuilderList()
repeated .google.protobuf.DescriptorProto message_type = 4;
|
String |
getName()
optional string name = 1;
|
ByteString |
getNameBytes()
optional string name = 1;
|
DescriptorProtos |
getOptions()
optional .google.protobuf.FileOptions options = 8;
|
DescriptorProtos |
getOptionsOrBuilder()
optional .google.protobuf.FileOptions options = 8;
|
String |
getPackage()
optional string package = 2;
|
ByteString |
getPackageBytes()
optional string package = 2;
|
Parser |
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;
|
List |
getPublicDependencyList()
repeated int32 public_dependency = 10;
|
int |
getSerializedSize()
Get the number of bytes required to encode this message.
|
DescriptorProtos |
getService(int index)
repeated .google.protobuf.ServiceDescriptorProto service = 6;
|
int |
getServiceCount()
repeated .google.protobuf.ServiceDescriptorProto service = 6;
|
List |
getServiceList()
repeated .google.protobuf.ServiceDescriptorProto service = 6;
|
DescriptorProtos |
getServiceOrBuilder(int index)
repeated .google.protobuf.ServiceDescriptorProto service = 6;
|
List |
getServiceOrBuilderList()
repeated .google.protobuf.ServiceDescriptorProto service = 6;
|
DescriptorProtos |
getSourceCodeInfo()
optional .google.protobuf.SourceCodeInfo source_code_info = 9;
|
DescriptorProtos |
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;
|
List |
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;
|
protected GeneratedMessage |
internalGetFieldAccessorTable()
Get the FieldAccessorTable for this type.
|
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded messages are set, false otherwise.
|
static DescriptorProtos |
newBuilder()
|
static DescriptorProtos |
newBuilder(DescriptorProtos
|
DescriptorProtos |
newBuilderForType()
Constructs a new builder for a message of the same type as this message.
|
protected DescriptorProtos |
newBuilderForType(GeneratedMessage
|
static DescriptorProtos |
parseDelimitedFrom(InputStream
|
static DescriptorProtos |
parseDelimitedFrom(InputStream
|
static DescriptorProtos |
parseFrom(byte[] data)
|
static DescriptorProtos |
parseFrom(byte[] data, ExtensionRegistryLite
|
static DescriptorProtos |
parseFrom(ByteString
|
static DescriptorProtos |
parseFrom(ByteString
|
static DescriptorProtos |
parseFrom(CodedInputStream
|
static DescriptorProtos |
parseFrom(CodedInputStream
|
static DescriptorProtos |
parseFrom(InputStream
|
static DescriptorProtos |
parseFrom(InputStream
|
DescriptorProtos |
toBuilder()
Constructs a builder initialized with the current message.
|
protected Object |
writeReplace()
Replaces this object in the output stream with a serialized form.
|
void |
writeTo(CodedOutputStream
Serializes the message and writes it to
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, waitfindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, 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()
MessageLiteOrBuilder
getDefaultInstance() method of generated message classes in that this method is an abstract method of the
MessageLite interface whereas
getDefaultInstance() is a static method of a specific class. They return the same thing.
public final UnknownFieldSetgetUnknownFields()
MessageOrBuilder
UnknownFieldSet for this message.
public static final Descriptors.Descriptor getDescriptor()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
GeneratedMessage
public Parser<DescriptorProtos .FileDescriptorProto > getParserForType()
MessageLite
public boolean hasName()
optional string name = 1;
file name, relative to root of source tree
public StringgetName()
optional string name = 1;
file name, relative to root of source tree
public ByteStringgetNameBytes()
optional string name = 1;
file name, relative to root of source tree
public boolean hasPackage()
optional string package = 2;
e.g. "foo", "foo.bar", etc.
public StringgetPackage()
optional string package = 2;
e.g. "foo", "foo.bar", etc.
public ByteStringgetPackageBytes()
optional string package = 2;
e.g. "foo", "foo.bar", etc.
public ProtocolStringListgetDependencyList()
repeated string dependency = 3;
Names of files imported by this file.
public int getDependencyCount()
repeated string dependency = 3;
Names of files imported by this file.
public StringgetDependency(int index)
repeated string dependency = 3;
Names of files imported by this file.
public ByteStringgetDependencyBytes(int index)
repeated string dependency = 3;
Names of files imported by this file.
public List<Integer > getPublicDependencyList()
repeated int32 public_dependency = 10;
Indexes of the public imported files in the dependency list above.
public int getPublicDependencyCount()
repeated int32 public_dependency = 10;
Indexes of the public imported files in the dependency list above.
public int getPublicDependency(int index)
repeated int32 public_dependency = 10;
Indexes of the public imported files in the dependency list above.
public List<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.
public 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.
public 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.
public List<DescriptorProtos .DescriptorProto > getMessageTypeList()
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
public List<? extends DescriptorProtos .DescriptorProtoOrBuilder > getMessageTypeOrBuilderList()
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
public int getMessageTypeCount()
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
public DescriptorProtos.DescriptorProto getMessageType(int index)
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
public DescriptorProtos.DescriptorProtoOrBuilder getMessageTypeOrBuilder(int index)
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
public List<DescriptorProtos .EnumDescriptorProto > getEnumTypeList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
public List<? extends DescriptorProtos .EnumDescriptorProtoOrBuilder > getEnumTypeOrBuilderList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
public int getEnumTypeCount()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
public DescriptorProtos.EnumDescriptorProto getEnumType(int index)
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
public DescriptorProtos.EnumDescriptorProtoOrBuilder getEnumTypeOrBuilder(int index)
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
public List<DescriptorProtos .ServiceDescriptorProto > getServiceList()
repeated .google.protobuf.ServiceDescriptorProto service = 6;
public List<? extends DescriptorProtos .ServiceDescriptorProtoOrBuilder > getServiceOrBuilderList()
repeated .google.protobuf.ServiceDescriptorProto service = 6;
public int getServiceCount()
repeated .google.protobuf.ServiceDescriptorProto service = 6;
public DescriptorProtos.ServiceDescriptorProto getService(int index)
repeated .google.protobuf.ServiceDescriptorProto service = 6;
public DescriptorProtos.ServiceDescriptorProtoOrBuilder getServiceOrBuilder(int index)
repeated .google.protobuf.ServiceDescriptorProto service = 6;
public List<DescriptorProtos .FieldDescriptorProto > getExtensionList()
repeated .google.protobuf.FieldDescriptorProto extension = 7;
public List<? extends DescriptorProtos .FieldDescriptorProtoOrBuilder > getExtensionOrBuilderList()
repeated .google.protobuf.FieldDescriptorProto extension = 7;
public int getExtensionCount()
repeated .google.protobuf.FieldDescriptorProto extension = 7;
public DescriptorProtos.FieldDescriptorProto getExtension(int index)
repeated .google.protobuf.FieldDescriptorProto extension = 7;
public DescriptorProtos.FieldDescriptorProtoOrBuilder getExtensionOrBuilder(int index)
repeated .google.protobuf.FieldDescriptorProto extension = 7;
public boolean hasOptions()
optional .google.protobuf.FileOptions options = 8;
public DescriptorProtos.FileOptions getOptions()
optional .google.protobuf.FileOptions options = 8;
public DescriptorProtos.FileOptionsOrBuilder getOptionsOrBuilder()
optional .google.protobuf.FileOptions options = 8;
public 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.
public 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.
public 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.
public final boolean isInitialized()
MessageLiteOrBuilder
public void writeTo(CodedOutputStreamoutput) throws IOException
MessageLite
output. This does not flush or close the stream.
writeTo in interface
MessageLite
writeTo in class
AbstractMessage
IOException
public int getSerializedSize()
MessageLite
protected ObjectwriteReplace() throws ObjectStreamException
GeneratedMessage
return super.writeReplace();
writeReplace in class
GeneratedMessage
ObjectStreamException
public static DescriptorProtos.FileDescriptorProto parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static DescriptorProtos.FileDescriptorProto parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static DescriptorProtos.FileDescriptorProto parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static DescriptorProtos.FileDescriptorProto parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static DescriptorProtos.FileDescriptorProto parseFrom(InputStream input) throws IOException
IOException
public static DescriptorProtos.FileDescriptorProto parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static DescriptorProtos.FileDescriptorProto parseDelimitedFrom(InputStream input) throws IOException
IOException
public static DescriptorProtos.FileDescriptorProto parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static DescriptorProtos.FileDescriptorProto parseFrom(CodedInputStream input) throws IOException
IOException
public static DescriptorProtos.FileDescriptorProto parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException
IOException
public static DescriptorProtos.FileDescriptorProto .Builder newBuilder()
public DescriptorProtos.FileDescriptorProto .Builder newBuilderForType()
MessageLite
public static DescriptorProtos.FileDescriptorProto .Builder newBuilder(DescriptorProtos .FileDescriptorProto prototype)
public DescriptorProtos.FileDescriptorProto .Builder toBuilder()
MessageLite
protected DescriptorProtos.FileDescriptorProto .Builder newBuilderForType(GeneratedMessage .BuilderParent parent)