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.
| Modifier and Type | Class 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 |
| public abstract static class | Descriptors.GenericDescriptor
All descriptors implement this to make it easier to implement tools like |
| 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. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static String | computeFullName(final Descriptors.
|