Stay organized with collectionsSave and categorize content based on your preferences.
publicfinalclassDescriptors
Contains a collection of classes which describe protocol message types.
Every message type has aDescriptor, 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 aFileDescriptorfor a relevant.protofile. You can obtain it by callingDescriptor.getFile(). AFileDescriptorcontains descriptors for all the messages defined
in that file, and file descriptors for all the imported.protofiles.
Descriptors are built from DescriptorProtos, as defined ingoogle/protobuf/descriptor.proto.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Class Descriptors (3.19.4)\n\n public final class Descriptors\n\nContains a collection of classes which describe protocol message types.\n\nEvery message type has a Descriptor, which lists all its fields and other information\nabout a type. You can get a message type's descriptor by calling `\nMessageType.getDescriptor()`, or (given a message object of the type) `\nmessage.getDescriptorForType()`. Furthermore, each message is associated with a FileDescriptor for a relevant `.proto` file. You can obtain it by calling `\nDescriptor.getFile()`. A FileDescriptor contains descriptors for all the messages defined\nin that file, and file descriptors for all the imported `.proto` files.\n\nDescriptors are built from DescriptorProtos, as defined in `\ngoogle/protobuf/descriptor.proto`. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e Descriptors \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nConstructors\n------------\n\n### Descriptors()\n\n public Descriptors()"]]