# Class Descriptors.MethodDescriptor (3.19.4)

    public static final class Descriptors.MethodDescriptor extends Descriptors.GenericDescriptor

Describes one method within a service type.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> [Descriptors.GenericDescriptor](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor) \> Descriptors.MethodDescriptor

## Inherited Members

[Descriptors.GenericDescriptor.getFile()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getFile__) [Descriptors.GenericDescriptor.getFullName()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getFullName__) [Descriptors.GenericDescriptor.getName()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getName__) [Descriptors.GenericDescriptor.toProto()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_toProto__) [Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Methods

### getFile()

    public Descriptors.FileDescriptor getFile()

Get the FileDescriptor containing this descriptor.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.FileDescriptor` |   |

**Overrides** [Descriptors.GenericDescriptor.getFile()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getFile__)

### getFullName()

    public String getFullName()

Get the method's fully-qualified name.
**See Also:** [Descriptors.Descriptor#getFullName()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor#com_google_protobuf_Descriptors_Descriptor_getFullName__)

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

**Overrides** [Descriptors.GenericDescriptor.getFullName()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getFullName__)

### getIndex()

    public int getIndex()

Get the index of this descriptor within its parent. \* @see Descriptors.Descriptor#getIndex()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getInputType()

    public Descriptors.Descriptor getInputType()

Get the method's input type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor` |   |

### getName()

    public String getName()

Get the method's unqualified name.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

**Overrides** [Descriptors.GenericDescriptor.getName()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_getName__)

### getOptions()

    public DescriptorProtos.MethodOptions getOptions()

Get the `MethodOptions`, defined in `descriptor.proto`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DescriptorProtos.MethodOptions` |   |

### getOutputType()

    public Descriptors.Descriptor getOutputType()

Get the method's output type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.Descriptor` |   |

### getService()

    public Descriptors.ServiceDescriptor getService()

Get the method's service type.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.ServiceDescriptor` |   |

### isClientStreaming()

    public boolean isClientStreaming()

Get whether or not the inputs are streaming.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### isServerStreaming()

    public boolean isServerStreaming()

Get whether or not the outputs are streaming.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### toProto()

    public DescriptorProtos.MethodDescriptorProto toProto()

Convert the descriptor to its protocol message representation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.DescriptorProtos.MethodDescriptorProto` |   |

**Overrides** [Descriptors.GenericDescriptor.toProto()](https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Descriptors.GenericDescriptor#com_google_protobuf_Descriptors_GenericDescriptor_toProto__)