public static final class Descriptors.EnumDescriptor extends Descriptors.GenericDescriptor implements Internal .EnumLiteMap <Descriptors .EnumValueDescriptor >
| Modifier and Type | Method and Description |
|---|---|
Descriptors |
findValueByName(String
Find an enum value by name.
|
Descriptors |
findValueByNumber(int number)
Find an enum value by number.
|
Descriptors |
getContainingType()
If this is a nested type, get the outer descriptor, otherwise null.
|
Descriptors |
getFile()
Get the
Descriptors.FileDescriptor containing this descriptor.
|
String |
getFullName()
Get the type's fully-qualified name.
|
int |
getIndex()
Get the index of this descriptor within its parent.
|
String |
getName()
Get the type's unqualified name.
|
DescriptorProtos |
getOptions()
Get the
EnumOptions, defined in
descriptor.proto.
|
List |
getValues()
Get a list of defined values for this enum.
|
DescriptorProtos |
toProto()
Convert the descriptor to its protocol message representation.
|
public int getIndex()
Descriptors.Descriptor.getIndex()
public DescriptorProtos.EnumDescriptorProto toProto()
public StringgetName()
public StringgetFullName()
getFullName in class
Descriptors.GenericDescriptor
Descriptors.Descriptor.getFullName()
public Descriptors.FileDescriptor getFile()
Descriptors.FileDescriptor containing this descriptor.
public Descriptors.Descriptor getContainingType()
public DescriptorProtos.EnumOptions getOptions()
EnumOptions, defined in
descriptor.proto.
public List<Descriptors .EnumValueDescriptor > getValues()
public Descriptors.EnumValueDescriptor findValueByName(String name)
name - The unqualified name of the value (e.g. "FOO").
null if not found.
public Descriptors.EnumValueDescriptor findValueByNumber(int number)
findValueByNumber in interface
Internal.EnumLiteMap <Descriptors.EnumValueDescriptor >
number - The value's number.
null if not found.