[[["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-08-28 UTC."],[],[],null,["# Class Descriptors.EnumDescriptor (3.19.4)\n\n public static final class Descriptors.EnumDescriptor extends Descriptors.GenericDescriptor implements Internal.EnumLiteMap\u003cDescriptors.EnumValueDescriptor\u003e\n\nDescribes an enum type. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e [Descriptors.GenericDescriptor](/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor) \\\u003e Descriptors.EnumDescriptor \n\nImplements\n----------\n\ncom.google.protobuf.Internal.EnumLiteMap\\\u003ccom.google.protobuf.Descriptors.EnumValueDescriptor\\\u003e \n\nInherited Members\n-----------------\n\n[Descriptors.GenericDescriptor.getFile()](/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getFile__) \n[Descriptors.GenericDescriptor.getFullName()](/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getFullName__) \n[Descriptors.GenericDescriptor.getName()](/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getName__) \n[Descriptors.GenericDescriptor.toProto()](/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_toProto__) \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\nMethods\n-------\n\n### findValueByName(String name)\n\n public Descriptors.EnumValueDescriptor findValueByName(String name)\n\nFind an enum value by name.\n\n### findValueByNumber(int number)\n\n public Descriptors.EnumValueDescriptor findValueByNumber(int number)\n\nFind an enum value by number. If multiple enum values have the same number, this returns the\nfirst defined value with that number.\n\n### findValueByNumberCreatingIfUnknown(int number)\n\n public Descriptors.EnumValueDescriptor findValueByNumberCreatingIfUnknown(int number)\n\nGet the enum value for a number. If no enum value has this number, construct an\nEnumValueDescriptor for it.\n\n### getContainingType()\n\n public Descriptors.Descriptor getContainingType()\n\nIf this is a nested type, get the outer descriptor, otherwise null.\n\n### getFile()\n\n public Descriptors.FileDescriptor getFile()\n\nGet the FileDescriptor containing this descriptor.\n\n**Overrides** \n[Descriptors.GenericDescriptor.getFile()](/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getFile__)\n\n### getFullName()\n\n public String getFullName()\n\nGet the type's fully-qualified name.\n**See Also:** [Descriptors.Descriptor#getFullName()](/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor#com_google_protobuf_Descriptors_Descriptor_getFullName__)\n\n**Overrides** \n[Descriptors.GenericDescriptor.getFullName()](/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getFullName__)\n\n### getIndex()\n\n public int getIndex()\n\nGet the index of this descriptor within its parent.\n**See Also:** [Descriptors.Descriptor#getIndex()](/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor#com_google_protobuf_Descriptors_Descriptor_getIndex__)\n\n### getName()\n\n public String getName()\n\nGet the type's unqualified name.\n\n**Overrides** \n[Descriptors.GenericDescriptor.getName()](/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getName__)\n\n### getOptions()\n\n public DescriptorProtos.EnumOptions getOptions()\n\nGet the `EnumOptions`, defined in `descriptor.proto`.\n\n### getValues()\n\n public List\u003cDescriptors.EnumValueDescriptor\u003e getValues()\n\nGet a list of defined values for this enum.\n\n### toProto()\n\n public DescriptorProtos.EnumDescriptorProto toProto()\n\nConvert the descriptor to its protocol message representation.\n\n**Overrides** \n[Descriptors.GenericDescriptor.toProto()](/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_toProto__)"]]