Class Descriptors

Stay organized with collections Save and categorize content based on your preferences.
public final class Descriptors

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.


java.lang.Object > Descriptors



public Descriptors()