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.FileDescriptor
private final String
private final int
private Descriptors.MethodDescriptor[]
private DescriptorProtos.ServiceOptions
Fields inherited from class com.google.protobuf.Descriptors.GenericDescriptor
features, parent
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ServiceDescriptor
(DescriptorProtos.ServiceDescriptorProto proto, Descriptors.FileDescriptor file, int index) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
findMethodByName
(String name) Find a method by name.getFile()
Get theDescriptors.FileDescriptor
containing this descriptor.Get the type's fully-qualified name.int
getIndex()
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 void
Seeinvalid reference
FileDescriptor#resolveAllFeatures
private void
toProto()
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:
toProto
in classDescriptors.GenericDescriptor
-
getName
Get the type's unqualified name.- Specified by:
getName
in classDescriptors.GenericDescriptor
-
getFullName
Get the type's fully-qualified name.- Specified by:
getFullName
in classDescriptors.GenericDescriptor
- See Also:
-
getFile
Get theDescriptors.FileDescriptor
containing this descriptor.- Specified by:
getFile
in 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
null
if not found
-
resolveAllFeatures
Seeinvalid reference
FileDescriptor#resolveAllFeatures
-
crossLink
-
setProto
private void setProto(DescriptorProtos.ServiceDescriptorProto proto) throws Descriptors.DescriptorValidationException
-