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
Type Description
Descriptors.FileDescriptor
Overrides

getFullName()

public String getFullName()

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

Returns
Type Description
String
Overrides

getIndex()

public int getIndex()

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

Returns
Type Description
int

getName()

public String getName()

Get the value's unqualified name.

Returns
Type Description
String
Overrides

getNumber()

public int getNumber()

Get the value's number.

Returns
Type Description
int

getOptions()

public DescriptorProtos.EnumValueOptions getOptions()

Get the EnumValueOptions, defined in descriptor.proto.

Returns
Type Description
DescriptorProtos.EnumValueOptions

getType()

public Descriptors.EnumDescriptor getType()

Get the value's enum type.

Returns
Type Description
Descriptors.EnumDescriptor

toProto()

public DescriptorProtos.EnumValueDescriptorProto toProto()

Convert the descriptor to its protocol message representation.

Returns
Type Description
DescriptorProtos.EnumValueDescriptorProto
Overrides

toString()

public String toString()
Returns
Type Description
String
Overrides