Top Description Inners Fields Constructors Methods
com.google.protobuf

public final Class Descriptors

extends Object
Class Inheritance
Static Imports
com.google.protobuf.Internal.checkNotNull

Contains a collection of classes which describe protocol message types.

Every message type has a Descriptor, which lists all its fields and other information about a type. You can get a message type's descriptor by calling MessageType.getDescriptor(), or (given a message object of the type) message.getDescriptorForType(). Furthermore, each message is associated with a FileDescriptor for a relevant .proto file. You can obtain it by calling Descriptor.getFile(). A FileDescriptor contains descriptors for all the messages defined in that file, and file descriptors for all the imported .proto files.

Descriptors are built from DescriptorProtos, as defined in google/protobuf/descriptor.proto.

Author
[email protected] Kenton Varda

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Descriptors.Descriptor

Describes a message type.

private static class
Descriptors.DescriptorPool

A private helper class which contains lookup tables containing all the descriptors defined in a particular file.

public static class
Descriptors.DescriptorValidationException

Thrown when building descriptors fails because the source DescriptorProtos are not valid.

public static class
Descriptors.EnumDescriptor

Describes an enum type.

public static class
Descriptors.EnumValueDescriptor

Describes one value within an enum type.

public static class
Descriptors.FieldDescriptor

Describes a field of a message type.

public static class
Descriptors.FileDescriptor

Describes a .proto file, including everything defined within.

public abstract static class
Descriptors.GenericDescriptor

All descriptors implement this to make it easier to implement tools like DescriptorPool.

public static class
Descriptors.MethodDescriptor

Describes one method within a service type.

public static class
Descriptors.OneofDescriptor

Describes an oneof of a message type.

public static class
Descriptors.ServiceDescriptor

Describes a service type.

Field Summary

Modifier and TypeField and Description
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait