Package com.google.protobuf
Class Descriptors
- java.lang.Object
-
- com.google.protobuf.Descriptors
-
public final class Descriptors extends java.lang.ObjectContains a collection of classes which describe protocol message types.Every message type has a
Descriptors.Descriptor, which lists all its fields and other information about a type. You can get a message type's descriptor by callingMessageType.getDescriptor(), or (given a message object of the type)message.getDescriptorForType(). Furthermore, each message is associated with aDescriptors.FileDescriptorfor a relevant.protofile. You can obtain it by callingDescriptor.getFile(). ADescriptors.FileDescriptorcontains descriptors for all the messages defined in that file, and file descriptors for all the imported.protofiles.Descriptors are built from DescriptorProtos, as defined in
google/protobuf/descriptor.proto.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDescriptors.DescriptorDescribes a message type.static classDescriptors.DescriptorValidationExceptionThrown when building descriptors fails because the source DescriptorProtos are not valid.static classDescriptors.EnumDescriptorDescribes an enum type.static classDescriptors.EnumValueDescriptorDescribes one value within an enum type.static classDescriptors.FieldDescriptorDescribes a field of a message type.static classDescriptors.FileDescriptorDescribes a.protofile, including everything defined within.static classDescriptors.GenericDescriptorAll descriptors implement this to make it easier to implement tools likeDescriptorPool.static classDescriptors.MethodDescriptorDescribes one method within a service type.static classDescriptors.OneofDescriptorDescribes a oneof of a message type.static classDescriptors.ServiceDescriptorDescribes a service type.
-
Constructor Summary
Constructors Constructor Description Descriptors()
-