Class Descriptors.ServiceDescriptor (3.19.4)

public static final class Descriptors.ServiceDescriptor extends Descriptors.GenericDescriptor

Describes a service type.

Inheritance

java.lang.Object > Descriptors.GenericDescriptor > Descriptors.ServiceDescriptor

Methods

findMethodByName(String name)

public Descriptors.MethodDescriptor findMethodByName(String name)

Find a method by name.

Parameter
Name Description
name String

The unqualified name of the method (e.g. "Foo").

Returns
Type Description
Descriptors.MethodDescriptor

the method's descriptor, or null if not found.

getFile()

public Descriptors.FileDescriptor getFile()

Get the FileDescriptor containing this descriptor.

Returns
Type Description
Descriptors.FileDescriptor
Overrides

getFullName()

public String getFullName()

Get the type'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 Descriptors.Descriptor#getIndex()

Returns
Type Description
int

getMethods()

public List<Descriptors.MethodDescriptor> getMethods()

Get a list of methods for this service.

Returns
Type Description
List<MethodDescriptor>

getName()

public String getName()

Get the type's unqualified name.

Returns
Type Description
String
Overrides

getOptions()

public DescriptorProtos.ServiceOptions getOptions()

Get the ServiceOptions, defined in descriptor.proto.

Returns
Type Description
DescriptorProtos.ServiceOptions

toProto()

public DescriptorProtos.ServiceDescriptorProto toProto()

Convert the descriptor to its protocol message representation.

Returns
Type Description
DescriptorProtos.ServiceDescriptorProto
Overrides