Package com.google.protobuf
Class Descriptors.MethodDescriptor
- java.lang.Object
-
- com.google.protobuf.Descriptors.GenericDescriptor
-
- com.google.protobuf.Descriptors.MethodDescriptor
-
- Enclosing class:
- Descriptors
public static final class Descriptors.MethodDescriptor extends Descriptors.GenericDescriptor
Describes one method within a service type.
-
-
Field Summary
Fields Modifier and Type Field Description private Descriptors.FileDescriptor
file
private java.lang.String
fullName
private int
index
private Descriptors.Descriptor
inputType
private DescriptorProtos.MethodOptions
options
private Descriptors.Descriptor
outputType
private DescriptorProtos.MethodDescriptorProto
proto
private Descriptors.ServiceDescriptor
service
-
Fields inherited from class com.google.protobuf.Descriptors.GenericDescriptor
features, parent
-
-
Constructor Summary
Constructors Modifier Constructor Description private
MethodDescriptor(DescriptorProtos.MethodDescriptorProto proto, Descriptors.FileDescriptor file, Descriptors.ServiceDescriptor parent, int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
crossLink()
Descriptors.FileDescriptor
getFile()
Get theDescriptors.FileDescriptor
containing this descriptor.java.lang.String
getFullName()
Get the method's fully-qualified name.int
getIndex()
Get the index of this descriptor within its parent.Descriptors.Descriptor
getInputType()
Get the method's input type.java.lang.String
getName()
Get the method's unqualified name.DescriptorProtos.MethodOptions
getOptions()
Get theMethodOptions
, defined indescriptor.proto
.Descriptors.Descriptor
getOutputType()
Get the method's output type.Descriptors.ServiceDescriptor
getService()
Get the method's service type.boolean
isClientStreaming()
Get whether or not the inputs are streaming.boolean
isServerStreaming()
Get whether or not the outputs are streaming.private void
resolveAllFeatures()
SeeFileDescriptor#resolveAllFeatures
.private void
setProto(DescriptorProtos.MethodDescriptorProto proto)
DescriptorProtos.MethodDescriptorProto
toProto()
Convert the descriptor to its protocol message representation.-
Methods inherited from class com.google.protobuf.Descriptors.GenericDescriptor
getFeatures, hasInferredLegacyProtoFeatures, inferLegacyProtoFeatures, resolveFeatures, validateFeatures
-
-
-
-
Field Detail
-
index
private final int index
-
proto
private DescriptorProtos.MethodDescriptorProto proto
-
options
private volatile DescriptorProtos.MethodOptions options
-
fullName
private final java.lang.String fullName
-
file
private final Descriptors.FileDescriptor file
-
service
private final Descriptors.ServiceDescriptor service
-
inputType
private Descriptors.Descriptor inputType
-
outputType
private Descriptors.Descriptor outputType
-
-
Constructor Detail
-
MethodDescriptor
private MethodDescriptor(DescriptorProtos.MethodDescriptorProto proto, Descriptors.FileDescriptor file, Descriptors.ServiceDescriptor parent, int index) throws Descriptors.DescriptorValidationException
-
-
Method Detail
-
getIndex
public int getIndex()
Get the index of this descriptor within its parent. * @see Descriptors.Descriptor#getIndex()
-
toProto
public DescriptorProtos.MethodDescriptorProto toProto()
Convert the descriptor to its protocol message representation.- Specified by:
toProto
in classDescriptors.GenericDescriptor
-
getName
public java.lang.String getName()
Get the method's unqualified name.- Specified by:
getName
in classDescriptors.GenericDescriptor
-
getFullName
public java.lang.String getFullName()
Get the method's fully-qualified name.- Specified by:
getFullName
in classDescriptors.GenericDescriptor
- See Also:
Descriptors.Descriptor.getFullName()
-
getFile
public Descriptors.FileDescriptor getFile()
Get theDescriptors.FileDescriptor
containing this descriptor.- Specified by:
getFile
in classDescriptors.GenericDescriptor
-
getService
public Descriptors.ServiceDescriptor getService()
Get the method's service type.
-
getInputType
public Descriptors.Descriptor getInputType()
Get the method's input type.
-
getOutputType
public Descriptors.Descriptor getOutputType()
Get the method's output type.
-
isClientStreaming
public boolean isClientStreaming()
Get whether or not the inputs are streaming.
-
isServerStreaming
public boolean isServerStreaming()
Get whether or not the outputs are streaming.
-
getOptions
public DescriptorProtos.MethodOptions getOptions()
Get theMethodOptions
, defined indescriptor.proto
.
-
resolveAllFeatures
private void resolveAllFeatures() throws Descriptors.DescriptorValidationException
SeeFileDescriptor#resolveAllFeatures
.
-
crossLink
private void crossLink() throws Descriptors.DescriptorValidationException
-
setProto
private void setProto(DescriptorProtos.MethodDescriptorProto proto) throws Descriptors.DescriptorValidationException
-
-