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, newMessageScopedGeneratedExtension
equals, findInitializationErrors, getInitializationErrorString, hashCode, toString
toByteArray, toByteString, writeDelimitedTo, writeTo
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getRepeatedField, getRepeatedFieldCount, hasField
toByteArray, toByteString, writeDelimitedTo, writeTo
public 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.getDefaultInstanceForType
in interface MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder
public final UnknownFieldSet getUnknownFields()
MessageOrBuilder
UnknownFieldSet
for this message.getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessage
public static final Descriptors.Descriptor getDescriptor()
public Parser<DescriptorProtos.FileDescriptorProto> getParserForType()
MessageLite
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessage
public boolean hasName()
optional string name = 1;
file name, relative to root of source tree
hasName
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public java.lang.String getName()
optional string name = 1;
file name, relative to root of source tree
getName
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public ByteString getNameBytes()
optional string name = 1;
file name, relative to root of source tree
getNameBytes
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public boolean hasPackage()
optional string package = 2;
e.g. "foo", "foo.bar", etc.
hasPackage
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public java.lang.String getPackage()
optional string package = 2;
e.g. "foo", "foo.bar", etc.
getPackage
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public ByteString getPackageBytes()
optional string package = 2;
e.g. "foo", "foo.bar", etc.
getPackageBytes
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public java.util.List<java.lang.String> getDependencyList()
repeated string dependency = 3;
Names of files imported by this file.
getDependencyList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public int getDependencyCount()
repeated string dependency = 3;
Names of files imported by this file.
getDependencyCount
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public java.lang.String getDependency(int index)
repeated string dependency = 3;
Names of files imported by this file.
getDependency
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public ByteString getDependencyBytes(int index)
repeated string dependency = 3;
Names of files imported by this file.
getDependencyBytes
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public 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.FileDescriptorProtoOrBuilder
public int getPublicDependencyCount()
repeated int32 public_dependency = 10;
Indexes of the public imported files in the dependency list above.
getPublicDependencyCount
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public int getPublicDependency(int index)
repeated int32 public_dependency = 10;
Indexes of the public imported files in the dependency list above.
getPublicDependency
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public 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.FileDescriptorProtoOrBuilder
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.
getWeakDependencyCount
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
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.
getWeakDependency
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public java.util.List<DescriptorProtos.DescriptorProto> getMessageTypeList()
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
getMessageTypeList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public 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.FileDescriptorProtoOrBuilder
public int getMessageTypeCount()
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
getMessageTypeCount
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.DescriptorProto getMessageType(int index)
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
getMessageType
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.DescriptorProtoOrBuilder getMessageTypeOrBuilder(int index)
repeated .google.protobuf.DescriptorProto message_type = 4;
All top-level definitions in this file.
getMessageTypeOrBuilder
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public java.util.List<DescriptorProtos.EnumDescriptorProto> getEnumTypeList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
getEnumTypeList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public java.util.List<? extends DescriptorProtos.EnumDescriptorProtoOrBuilder> getEnumTypeOrBuilderList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
getEnumTypeOrBuilderList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public int getEnumTypeCount()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
getEnumTypeCount
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.EnumDescriptorProto getEnumType(int index)
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
getEnumType
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.EnumDescriptorProtoOrBuilder getEnumTypeOrBuilder(int index)
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
getEnumTypeOrBuilder
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public java.util.List<DescriptorProtos.ServiceDescriptorProto> getServiceList()
repeated .google.protobuf.ServiceDescriptorProto service = 6;
getServiceList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public java.util.List<? extends DescriptorProtos.ServiceDescriptorProtoOrBuilder> getServiceOrBuilderList()
repeated .google.protobuf.ServiceDescriptorProto service = 6;
getServiceOrBuilderList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public int getServiceCount()
repeated .google.protobuf.ServiceDescriptorProto service = 6;
getServiceCount
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.ServiceDescriptorProto getService(int index)
repeated .google.protobuf.ServiceDescriptorProto service = 6;
getService
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.ServiceDescriptorProtoOrBuilder getServiceOrBuilder(int index)
repeated .google.protobuf.ServiceDescriptorProto service = 6;
getServiceOrBuilder
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public java.util.List<DescriptorProtos.FieldDescriptorProto> getExtensionList()
repeated .google.protobuf.FieldDescriptorProto extension = 7;
getExtensionList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public java.util.List<? extends DescriptorProtos.FieldDescriptorProtoOrBuilder> getExtensionOrBuilderList()
repeated .google.protobuf.FieldDescriptorProto extension = 7;
getExtensionOrBuilderList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public int getExtensionCount()
repeated .google.protobuf.FieldDescriptorProto extension = 7;
getExtensionCount
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.FieldDescriptorProto getExtension(int index)
repeated .google.protobuf.FieldDescriptorProto extension = 7;
getExtension
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.FieldDescriptorProtoOrBuilder getExtensionOrBuilder(int index)
repeated .google.protobuf.FieldDescriptorProto extension = 7;
getExtensionOrBuilder
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public boolean hasOptions()
optional .google.protobuf.FileOptions options = 8;
hasOptions
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.FileOptions getOptions()
optional .google.protobuf.FileOptions options = 8;
getOptions
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.FileOptionsOrBuilder getOptionsOrBuilder()
optional .google.protobuf.FileOptions options = 8;
getOptionsOrBuilder
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
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.
hasSourceCodeInfo
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
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.
getSourceCodeInfo
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
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.
getSourceCodeInfoOrBuilder
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessage
public void writeTo(CodedOutputStream output) throws java.io.IOException
MessageLite
output
. This does not
flush or close the stream.writeTo
in interface MessageLite
writeTo
in class AbstractMessage
java.io.IOException
public int getSerializedSize()
MessageLite
getSerializedSize
in interface MessageLite
getSerializedSize
in class AbstractMessage
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(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static DescriptorProtos.FileDescriptorProto parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static DescriptorProtos.FileDescriptorProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static DescriptorProtos.FileDescriptorProto parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static DescriptorProtos.FileDescriptorProto parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOException
public static DescriptorProtos.FileDescriptorProto parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static DescriptorProtos.FileDescriptorProto.Builder newBuilder()
public DescriptorProtos.FileDescriptorProto.Builder newBuilderForType()
MessageLite
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static DescriptorProtos.FileDescriptorProto.Builder newBuilder(DescriptorProtos.FileDescriptorProto prototype)
public DescriptorProtos.FileDescriptorProto.Builder toBuilder()
MessageLite
toBuilder
in interface Message
toBuilder
in interface MessageLite