Class Descriptors.EnumValueDescriptor (3.19.4)

public static final class Descriptors.EnumValueDescriptor extends Descriptors.GenericDescriptor implements Internal.EnumLite

Describes one value within an enum type. Note that multiple defined values may have the same number. In generated Java code, all values with the same number after the first become aliases of the first. However, they still have independent EnumValueDescriptors.

Inheritance

java.lang.Object > Descriptors.GenericDescriptor > Descriptors.EnumValueDescriptor

Implements

Internal.EnumLite

Methods

getFile()

public Descriptors.FileDescriptor getFile()

Get the FileDescriptor containing this descriptor.

Returns
TypeDescription
Descriptors.FileDescriptor
Overrides

getFullName()

public String getFullName()

Get the value's fully-qualified name. See Also: Descriptors.Descriptor#getFullName()

Returns
TypeDescription
String
Overrides

getIndex()

public int getIndex()

Get the index of this descriptor within its parent. See Also: Descriptors.Descriptor#getIndex()

Returns
TypeDescription
int

getName()

public String getName()

Get the value's unqualified name.

Returns
TypeDescription
String
Overrides

getNumber()

public int getNumber()

Get the value's number.

Returns
TypeDescription
int

getOptions()

public DescriptorProtos.EnumValueOptions getOptions()

Get the EnumValueOptions, defined in descriptor.proto.

Returns
TypeDescription
DescriptorProtos.EnumValueOptions

getType()

public Descriptors.EnumDescriptor getType()

Get the value's enum type.

Returns
TypeDescription
Descriptors.EnumDescriptor

toProto()

public DescriptorProtos.EnumValueDescriptorProto toProto()

Convert the descriptor to its protocol message representation.

Returns
TypeDescription
DescriptorProtos.EnumValueDescriptorProto
Overrides

toString()

public String toString()
Returns
TypeDescription
String
Overrides