public static final class DescriptorProtos.FileDescriptorProto extends GeneratedMessageLite<DescriptorProtos.FileDescriptorProto,DescriptorProtos.FileDescriptorProto.Builder> implements DescriptorProtos.FileDescriptorProtoOrBuilder
Describes a complete .proto file.Protobuf type
google.protobuf.FileDescriptorProto
Modifier and Type | Class and Description |
---|---|
static class |
DescriptorProtos.FileDescriptorProto.Builder
Describes a complete .proto file.
|
GeneratedMessageLite.DefaultInstanceBasedParser<T extends GeneratedMessageLite<T,?>>, GeneratedMessageLite.ExtendableBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageLite.ExtendableMessage<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends GeneratedMessageLite.ExtendableMessage<MessageType,BuilderType>,BuilderType extends GeneratedMessageLite.ExtendableBuilder<MessageType,BuilderType>>, GeneratedMessageLite.GeneratedExtension<ContainingType extends MessageLite,Type>, GeneratedMessageLite.MergeFromVisitor, GeneratedMessageLite.MethodToInvoke, GeneratedMessageLite.SerializedForm, GeneratedMessageLite.Visitor
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 int |
PUBLIC_DEPENDENCY_FIELD_NUMBER |
static int |
SERVICE_FIELD_NUMBER |
static int |
SOURCE_CODE_INFO_FIELD_NUMBER |
static int |
SYNTAX_FIELD_NUMBER |
static int |
WEAK_DEPENDENCY_FIELD_NUMBER |
memoizedSerializedSize, unknownFields
memoizedHashCode
Modifier and Type | Method and Description |
---|---|
protected Object |
dynamicMethod(GeneratedMessageLite.MethodToInvoke method,
Object arg0,
Object arg1)
A method that implements different types of operations described in
GeneratedMessageLite.MethodToInvoke . |
static DescriptorProtos.FileDescriptorProto |
getDefaultInstance() |
String |
getDependency(int index)
Names of files imported by this file.
|
ByteString |
getDependencyBytes(int index)
Names of files imported by this file.
|
int |
getDependencyCount()
Names of files imported by this file.
|
List<String> |
getDependencyList()
Names of files imported by this file.
|
DescriptorProtos.EnumDescriptorProto |
getEnumType(int index)
repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
int |
getEnumTypeCount()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
List<DescriptorProtos.EnumDescriptorProto> |
getEnumTypeList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
DescriptorProtos.EnumDescriptorProtoOrBuilder |
getEnumTypeOrBuilder(int index)
repeated .google.protobuf.EnumDescriptorProto enum_type = 5; |
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; |
List<DescriptorProtos.FieldDescriptorProto> |
getExtensionList()
repeated .google.protobuf.FieldDescriptorProto extension = 7; |
DescriptorProtos.FieldDescriptorProtoOrBuilder |
getExtensionOrBuilder(int index)
repeated .google.protobuf.FieldDescriptorProto extension = 7; |
List<? extends DescriptorProtos.FieldDescriptorProtoOrBuilder> |
getExtensionOrBuilderList()
repeated .google.protobuf.FieldDescriptorProto extension = 7; |
DescriptorProtos.DescriptorProto |
getMessageType(int index)
All top-level definitions in this file.
|
int |
getMessageTypeCount()
All top-level definitions in this file.
|
List<DescriptorProtos.DescriptorProto> |
getMessageTypeList()
All top-level definitions in this file.
|
DescriptorProtos.DescriptorProtoOrBuilder |
getMessageTypeOrBuilder(int index)
All top-level definitions in this file.
|
List<? extends DescriptorProtos.DescriptorProtoOrBuilder> |
getMessageTypeOrBuilderList()
All top-level definitions in this file.
|
String |
getName()
file name, relative to root of source tree
|
ByteString |
getNameBytes()
file name, relative to root of source tree
|
DescriptorProtos.FileOptions |
getOptions()
optional .google.protobuf.FileOptions options = 8; |
String |
getPackage()
e.g.
|
ByteString |
getPackageBytes()
e.g.
|
int |
getPublicDependency(int index)
Indexes of the public imported files in the dependency list above.
|
int |
getPublicDependencyCount()
Indexes of the public imported files in the dependency list above.
|
List<Integer> |
getPublicDependencyList()
Indexes of the public imported files in the dependency list above.
|
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; |
List<DescriptorProtos.ServiceDescriptorProto> |
getServiceList()
repeated .google.protobuf.ServiceDescriptorProto service = 6; |
DescriptorProtos.ServiceDescriptorProtoOrBuilder |
getServiceOrBuilder(int index)
repeated .google.protobuf.ServiceDescriptorProto service = 6; |
List<? extends DescriptorProtos.ServiceDescriptorProtoOrBuilder> |
getServiceOrBuilderList()
repeated .google.protobuf.ServiceDescriptorProto service = 6; |
DescriptorProtos.SourceCodeInfo |
getSourceCodeInfo()
This field contains optional information about the original source code.
|
String |
getSyntax()
The syntax of the proto file.
|
ByteString |
getSyntaxBytes()
The syntax of the proto file.
|
int |
getWeakDependency(int index)
Indexes of the weak imported files in the dependency list.
|
int |
getWeakDependencyCount()
Indexes of the weak imported files in the dependency list.
|
List<Integer> |
getWeakDependencyList()
Indexes of the weak imported files in the dependency list.
|
boolean |
hasName()
file name, relative to root of source tree
|
boolean |
hasOptions()
optional .google.protobuf.FileOptions options = 8; |
boolean |
hasPackage()
e.g.
|
boolean |
hasSourceCodeInfo()
This field contains optional information about the original source code.
|
boolean |
hasSyntax()
The syntax of the proto file.
|
static DescriptorProtos.FileDescriptorProto.Builder |
newBuilder() |
static DescriptorProtos.FileDescriptorProto.Builder |
newBuilder(DescriptorProtos.FileDescriptorProto prototype) |
static DescriptorProtos.FileDescriptorProto |
parseDelimitedFrom(InputStream input) |
static DescriptorProtos.FileDescriptorProto |
parseDelimitedFrom(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(InputStream input) |
static DescriptorProtos.FileDescriptorProto |
parseFrom(InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<DescriptorProtos.FileDescriptorProto> |
parser() |
void |
writeTo(CodedOutputStream output)
Serializes the message and writes it to
output . |
dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, hashCode, isInitialized, isInitialized, makeImmutable, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, toBuilder, toString
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDefaultInstanceForType, isInitialized
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 final int SYNTAX_FIELD_NUMBER
public boolean hasName()
file name, relative to root of source tree
optional string name = 1;
hasName
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public String getName()
file name, relative to root of source tree
optional string name = 1;
getName
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public ByteString getNameBytes()
file name, relative to root of source tree
optional string name = 1;
getNameBytes
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public boolean hasPackage()
e.g. "foo", "foo.bar", etc.
optional string package = 2;
hasPackage
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public String getPackage()
e.g. "foo", "foo.bar", etc.
optional string package = 2;
getPackage
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public ByteString getPackageBytes()
e.g. "foo", "foo.bar", etc.
optional string package = 2;
getPackageBytes
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public List<String> getDependencyList()
Names of files imported by this file.
repeated string dependency = 3;
getDependencyList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public int getDependencyCount()
Names of files imported by this file.
repeated string dependency = 3;
getDependencyCount
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public String getDependency(int index)
Names of files imported by this file.
repeated string dependency = 3;
getDependency
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public ByteString getDependencyBytes(int index)
Names of files imported by this file.
repeated string dependency = 3;
getDependencyBytes
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public List<Integer> getPublicDependencyList()
Indexes of the public imported files in the dependency list above.
repeated int32 public_dependency = 10;
getPublicDependencyList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public int getPublicDependencyCount()
Indexes of the public imported files in the dependency list above.
repeated int32 public_dependency = 10;
getPublicDependencyCount
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public int getPublicDependency(int index)
Indexes of the public imported files in the dependency list above.
repeated int32 public_dependency = 10;
getPublicDependency
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public List<Integer> getWeakDependencyList()
Indexes of the weak imported files in the dependency list. For Google-internal migration only. Do not use.
repeated int32 weak_dependency = 11;
getWeakDependencyList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public int getWeakDependencyCount()
Indexes of the weak imported files in the dependency list. For Google-internal migration only. Do not use.
repeated int32 weak_dependency = 11;
getWeakDependencyCount
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public int getWeakDependency(int index)
Indexes of the weak imported files in the dependency list. For Google-internal migration only. Do not use.
repeated int32 weak_dependency = 11;
getWeakDependency
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public List<DescriptorProtos.DescriptorProto> getMessageTypeList()
All top-level definitions in this file.
repeated .google.protobuf.DescriptorProto message_type = 4;
getMessageTypeList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public List<? extends DescriptorProtos.DescriptorProtoOrBuilder> getMessageTypeOrBuilderList()
All top-level definitions in this file.
repeated .google.protobuf.DescriptorProto message_type = 4;
public int getMessageTypeCount()
All top-level definitions in this file.
repeated .google.protobuf.DescriptorProto message_type = 4;
getMessageTypeCount
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.DescriptorProto getMessageType(int index)
All top-level definitions in this file.
repeated .google.protobuf.DescriptorProto message_type = 4;
getMessageType
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.DescriptorProtoOrBuilder getMessageTypeOrBuilder(int index)
All top-level definitions in this file.
repeated .google.protobuf.DescriptorProto message_type = 4;
public List<DescriptorProtos.EnumDescriptorProto> getEnumTypeList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
getEnumTypeList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public List<? extends DescriptorProtos.EnumDescriptorProtoOrBuilder> getEnumTypeOrBuilderList()
repeated .google.protobuf.EnumDescriptorProto enum_type = 5;
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;
public List<DescriptorProtos.ServiceDescriptorProto> getServiceList()
repeated .google.protobuf.ServiceDescriptorProto service = 6;
getServiceList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public List<? extends DescriptorProtos.ServiceDescriptorProtoOrBuilder> getServiceOrBuilderList()
repeated .google.protobuf.ServiceDescriptorProto service = 6;
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;
public List<DescriptorProtos.FieldDescriptorProto> getExtensionList()
repeated .google.protobuf.FieldDescriptorProto extension = 7;
getExtensionList
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public List<? extends DescriptorProtos.FieldDescriptorProtoOrBuilder> getExtensionOrBuilderList()
repeated .google.protobuf.FieldDescriptorProto extension = 7;
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;
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 boolean hasSourceCodeInfo()
This field contains optional information about the original source code. You may safely remove this entire field without harming runtime functionality of the descriptors -- the information is needed only by development tools.
optional .google.protobuf.SourceCodeInfo source_code_info = 9;
hasSourceCodeInfo
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public DescriptorProtos.SourceCodeInfo getSourceCodeInfo()
This field contains optional information about the original source code. You may safely remove this entire field without harming runtime functionality of the descriptors -- the information is needed only by development tools.
optional .google.protobuf.SourceCodeInfo source_code_info = 9;
getSourceCodeInfo
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public boolean hasSyntax()
The syntax of the proto file. The supported values are "proto2" and "proto3".
optional string syntax = 12;
hasSyntax
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public String getSyntax()
The syntax of the proto file. The supported values are "proto2" and "proto3".
optional string syntax = 12;
getSyntax
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public ByteString getSyntaxBytes()
The syntax of the proto file. The supported values are "proto2" and "proto3".
optional string syntax = 12;
getSyntaxBytes
in interface DescriptorProtos.FileDescriptorProtoOrBuilder
public void writeTo(CodedOutputStream output) throws IOException
MessageLite
output
. This does not
flush or close the stream.writeTo
in interface MessageLite
IOException
public int getSerializedSize()
MessageLite
getSerializedSize
in interface MessageLite
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 static DescriptorProtos.FileDescriptorProto.Builder newBuilder(DescriptorProtos.FileDescriptorProto prototype)
protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1)
GeneratedMessageLite
GeneratedMessageLite.MethodToInvoke
.
Theses different kinds of operations are required to implement message-level operations for
builders in the runtime. This method bundles those operations to reduce the generated methods
count.
MERGE_FROM_STREAM
is parameterized with an CodedInputStream
and
ExtensionRegistryLite
. It consumes the input stream, parsing the contents into the
returned protocol buffer. If parsing throws an InvalidProtocolBufferException
, the
implementation wraps it in a RuntimeException.
NEW_INSTANCE
returns a new instance of the protocol buffer that has not yet been
made immutable. See MAKE_IMMUTABLE
.
IS_INITIALIZED
is parameterized with a Boolean
detailing whether to
memoize. It returns null
for false and the default instance for true. We optionally
memoize to support the Builder case, where memoization is not desired.
NEW_BUILDER
returns a BuilderType
instance.
VISIT
is parameterized with a Visitor
and a MessageType
and
recursively iterates through the fields side by side between this and the instance.
MAKE_IMMUTABLE
sets all internal fields to an immutable state.
For use by generated code only.
public static DescriptorProtos.FileDescriptorProto getDefaultInstance()
public static Parser<DescriptorProtos.FileDescriptorProto> parser()
Copyright © 2008–2016 Google. All rights reserved.