Package com.google.protobuf

# Class Descriptors.OneofDescriptor

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

Enclosing class:
  `Descriptors`

public static final class Descriptors.OneofDescriptor extends Descriptors.GenericDescriptor
Describes a oneof of a message type.

## Method Summary

Modifier and Type
Method
Description
`Descriptors.Descriptor`
`getContainingType()`
`Descriptors.FieldDescriptor`
`getField(int index)`
`int`
`getFieldCount()`
`List<Descriptors.FieldDescriptor>`
`getFields()`
Get a list of this message type's fields.
`Descriptors.FileDescriptor`
`getFile()`
`String`
`getFullName()`
`int`
`getIndex()`
Get the index of this descriptor within its parent.
`String`
`getName()`
`DescriptorProtos.OneofOptions`
`getOptions()`
`DescriptorProtos.OneofDescriptorProto`
`toProto()`

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

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

## Method Details

### getIndex

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

### getName

public String getName()

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

### getFile

public Descriptors.FileDescriptor getFile()

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

### getFullName

public String getFullName()

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

### getContainingType

public Descriptors.Descriptor getContainingType()

### getFieldCount

public int getFieldCount()

### getOptions

public DescriptorProtos.OneofOptions getOptions()

### getFields

public List<Descriptors.FieldDescriptor> getFields()
Get a list of this message type's fields.

### getField

public Descriptors.FieldDescriptor getField(int index)

### toProto

public DescriptorProtos.OneofDescriptorProto toProto()

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