Package com.google.protobuf
Class Descriptors.ServiceDescriptor
- java.lang.Object
-
- com.google.protobuf.Descriptors.GenericDescriptor
-
- com.google.protobuf.Descriptors.ServiceDescriptor
-
- Enclosing class:
- Descriptors
public static final class Descriptors.ServiceDescriptor extends Descriptors.GenericDescriptor
Describes a service type.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Descriptors.MethodDescriptorfindMethodByName(java.lang.String name)Find a method by name.Descriptors.FileDescriptorgetFile()Get theDescriptors.FileDescriptorcontaining this descriptor.java.lang.StringgetFullName()Get the type's fully-qualified name.intgetIndex()Get the index of this descriptor within its parent.java.util.List<Descriptors.MethodDescriptor>getMethods()Get a list of methods for this service.java.lang.StringgetName()Get the type's unqualified name.DescriptorProtos.ServiceOptionsgetOptions()Get theServiceOptions, defined indescriptor.proto.DescriptorProtos.ServiceDescriptorPrototoProto()Convert the descriptor to its protocol message representation.
-
-
-
Method Detail
-
getIndex
public int getIndex()
Get the index of this descriptor within its parent. * @see Descriptors.Descriptor#getIndex()
-
toProto
public DescriptorProtos.ServiceDescriptorProto toProto()
Convert the descriptor to its protocol message representation.- Specified by:
toProtoin classDescriptors.GenericDescriptor
-
getName
public java.lang.String getName()
Get the type's unqualified name.- Specified by:
getNamein classDescriptors.GenericDescriptor
-
getFullName
public java.lang.String getFullName()
Get the type's fully-qualified name.- Specified by:
getFullNamein classDescriptors.GenericDescriptor- See Also:
Descriptors.Descriptor.getFullName()
-
getFile
public Descriptors.FileDescriptor getFile()
Get theDescriptors.FileDescriptorcontaining this descriptor.- Specified by:
getFilein classDescriptors.GenericDescriptor
-
getOptions
public DescriptorProtos.ServiceOptions getOptions()
Get theServiceOptions, defined indescriptor.proto.
-
getMethods
public java.util.List<Descriptors.MethodDescriptor> getMethods()
Get a list of methods for this service.
-
findMethodByName
public Descriptors.MethodDescriptor findMethodByName(java.lang.String name)
Find a method by name.- Parameters:
name- the unqualified name of the method such as "Foo"- Returns:
- the method's descriptor, or
nullif not found
-
-