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
NameDescription
nameString

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

Returns
TypeDescription
Descriptors.MethodDescriptor

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

getFile()

public Descriptors.FileDescriptor getFile()

Get the FileDescriptor containing this descriptor.

Returns
TypeDescription
Descriptors.FileDescriptor
Overrides

getFullName()

public String getFullName()

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

Returns
TypeDescription
String
Overrides

getIndex()

public int getIndex()

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

Returns
TypeDescription
int

getMethods()

public List<Descriptors.MethodDescriptor> getMethods()

Get a list of methods for this service.

Returns
TypeDescription
List<MethodDescriptor>

getName()

public String getName()

Get the type's unqualified name.

Returns
TypeDescription
String
Overrides

getOptions()

public DescriptorProtos.ServiceOptions getOptions()

Get the ServiceOptions, defined in descriptor.proto.

Returns
TypeDescription
DescriptorProtos.ServiceOptions

toProto()

public DescriptorProtos.ServiceDescriptorProto toProto()

Convert the descriptor to its protocol message representation.

Returns
TypeDescription
DescriptorProtos.ServiceDescriptorProto
Overrides