Package com.google.protobuf

# Class Descriptors

java.lang.Object
com.google.protobuf.Descriptors

@CheckReturnValue public final class Descriptors extends Object
Contains 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 calling `MessageType.getDescriptor()`, or (given a message object of the type) `message.getDescriptorForType()`. Furthermore, each message is associated with a `Descriptors.FileDescriptor` for a relevant `.proto` file. You can obtain it by calling `Descriptor.getFile()`. A `Descriptors.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`.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`Descriptors.Descriptor`
Describes a message type.
`static class`
`Descriptors.DescriptorValidationException`
Thrown when building descriptors fails because the source DescriptorProtos are not valid.
`static final class`
`Descriptors.EnumDescriptor`
Describes an enum type.
`static final class`
`Descriptors.EnumValueDescriptor`
Describes one value within an enum type.
`static final class`
`Descriptors.FieldDescriptor`
Describes a field of a message type.
`static final class`
`Descriptors.FileDescriptor`
Describes a `.proto` file, including everything defined within.
`static class`
`Descriptors.GenericDescriptor`
All descriptors implement this to make it easier to implement tools like `DescriptorPool`.
`static final class`
`Descriptors.MethodDescriptor`
Describes one method within a service type.
`static final class`
`Descriptors.OneofDescriptor`
Describes a oneof of a message type.
`static final class`
`Descriptors.ServiceDescriptor`
Describes a service type.

## Constructor Summary

Constructors
Constructor
Description
`Descriptors()`

## Method Summary

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Descriptors

public Descriptors()