Package com.google.protobuf

# Class Descriptors.EnumValueDescriptor

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

All Implemented Interfaces:
  `Internal.EnumLite`

Enclosing class:
  Descriptors

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.

## Method Summary

Modifier and Type
Method
Description
`Descriptors.FileDescriptor`
`getFile()`
Get the `Descriptors.FileDescriptor` containing this descriptor.
`String`
`getFullName()`
Get the value's fully-qualified name.
`int`
`getIndex()`
Get the index of this descriptor within its parent.
`String`
`getName()`
Get the value's unqualified name.
`int`
`getNumber()`
Get the value's number.
`DescriptorProtos.EnumValueOptions`
`getOptions()`
Get the `EnumValueOptions`, defined in `descriptor.proto`.
`Descriptors.EnumDescriptor`
`getType()`
Get the value's enum type.
`DescriptorProtos.EnumValueDescriptorProto`
`toProto()`
Convert the descriptor to its protocol message representation.
`String`
`toString()`

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

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

## Method Details

### getIndex

public int getIndex()
Get the index of this descriptor within its parent.

See Also:
  - `Descriptors.Descriptor.getIndex()`

### toProto

public DescriptorProtos.EnumValueDescriptorProto toProto()
Convert the descriptor to its protocol message representation.

Specified by:
  `toProto` in class `Descriptors.GenericDescriptor`

### getName

public String getName()
Get the value's unqualified name.

Specified by:
  `getName` in class `Descriptors.GenericDescriptor`

### getNumber

public int getNumber()
Get the value's number.

Specified by:
  `getNumber` in interface `Internal.EnumLite`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### getFullName

public String getFullName()
Get the value's fully-qualified name.

Specified by:
  `getFullName` in class `Descriptors.GenericDescriptor`
See Also:
  - `Descriptors.Descriptor.getFullName()`

### getFile

public Descriptors.FileDescriptor getFile()
Get the `Descriptors.FileDescriptor` containing this descriptor.

Specified by:
  `getFile` in class `Descriptors.GenericDescriptor`

### getType

public Descriptors.EnumDescriptor getType()
Get the value's enum type.

### getOptions

public DescriptorProtos.EnumValueOptions getOptions()
Get the `EnumValueOptions`, defined in `descriptor.proto`.