Package com.google.protobuf
Class Descriptors.ServiceDescriptor
java.lang.Object
com.google.protobuf.Descriptors.GenericDescriptor
com.google.protobuf.Descriptors.ServiceDescriptor
- Enclosing class:
Descriptors
Describes a service type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Descriptors.FileDescriptorprivate final Stringprivate final intprivate Descriptors.MethodDescriptor[]private DescriptorProtos.ServiceOptionsFields inherited from class com.google.protobuf.Descriptors.GenericDescriptor
features, parent -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateServiceDescriptor(DescriptorProtos.ServiceDescriptorProto proto, Descriptors.FileDescriptor file, int index) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidfindMethodByName(String name) Find a method by name.getFile()Get theDescriptors.FileDescriptorcontaining this descriptor.Get the type's fully-qualified name.intgetIndex()Get the index of this descriptor within its parent.Get a list of methods for this service.getName()Get the type's unqualified name.Get theServiceOptions, defined indescriptor.proto.private voidSee.invalid reference
FileDescriptor#resolveAllFeaturesprivate voidtoProto()Convert the descriptor to its protocol message representation.Methods inherited from class com.google.protobuf.Descriptors.GenericDescriptor
getFeatures, hasInferredLegacyProtoFeatures, inferLegacyProtoFeatures, resolveFeatures, validateFeatures
-
Field Details
-
index
private final int index -
proto
-
options
-
fullName
-
file
-
methods
-
-
Constructor Details
-
ServiceDescriptor
private ServiceDescriptor(DescriptorProtos.ServiceDescriptorProto proto, Descriptors.FileDescriptor file, int index) throws Descriptors.DescriptorValidationException
-
-
Method Details
-
getIndex
public int getIndex()Get the index of this descriptor within its parent. * @see Descriptors.Descriptor#getIndex() -
toProto
Convert the descriptor to its protocol message representation.- Specified by:
toProtoin classDescriptors.GenericDescriptor
-
getName
Get the type's unqualified name.- Specified by:
getNamein classDescriptors.GenericDescriptor
-
getFullName
Get the type's fully-qualified name.- Specified by:
getFullNamein classDescriptors.GenericDescriptor- See Also:
-
getFile
Get theDescriptors.FileDescriptorcontaining this descriptor.- Specified by:
getFilein classDescriptors.GenericDescriptor
-
getOptions
Get theServiceOptions, defined indescriptor.proto. -
getMethods
Get a list of methods for this service. -
findMethodByName
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
-
resolveAllFeatures
See.invalid reference
FileDescriptor#resolveAllFeatures -
crossLink
-
setProto
private void setProto(DescriptorProtos.ServiceDescriptorProto proto) throws Descriptors.DescriptorValidationException
-