Package com.linecorp.armeria.server.docs
Class MethodInfo
java.lang.Object
com.linecorp.armeria.server.docs.MethodInfo
Metadata about a function of a
Service
.-
Constructor Summary
ConstructorDescriptionMethodInfo
(String serviceName, String name, int overloadId, TypeSignature returnTypeSignature, Iterable<FieldInfo> parameters, Iterable<EndpointInfo> endpoints, Iterable<String> examplePaths, Iterable<String> exampleQueries, HttpMethod httpMethod, DescriptionInfo descriptionInfo) Creates a new instance.MethodInfo
(String serviceName, String name, int overloadId, TypeSignature returnTypeSignature, Iterable<FieldInfo> parameters, Iterable<TypeSignature> exceptionTypeSignatures, Iterable<EndpointInfo> endpoints, HttpMethod httpMethod, DescriptionInfo descriptionInfo) Creates a new instance.MethodInfo
(String serviceName, String name, TypeSignature returnTypeSignature, Iterable<FieldInfo> parameters, boolean useParameterAsRoot, Iterable<TypeSignature> exceptionTypeSignatures, Iterable<EndpointInfo> endpoints, Iterable<HttpHeaders> exampleHeaders, Iterable<String> exampleRequests, Iterable<String> examplePaths, Iterable<String> exampleQueries, HttpMethod httpMethod, DescriptionInfo descriptionInfo) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionReturns the description information of the function.Returns the endpoints for accessing this method.boolean
Returns the example HTTP headers of the method.Returns the example paths of the method.Returns the example queries of the method.Returns the list of the example request serialized in a string.Returns the metadata about the exceptions declared by the function.int
hashCode()
Returns the HTTP method of this method.id()
Returns the id of this function.name()
Returns the name of the function.Returns the metadata about the parameters of the function.Returns the signature of the return type of the function.toString()
boolean
Tells whether theparameters()
is used as the root when creating JSON schema.withDescriptionInfo
(DescriptionInfo descriptionInfo) Returns a newMethodInfo
with the specifiedDescriptionInfo
.withParameters
(Iterable<FieldInfo> parameters) Returns a newMethodInfo
with the specifiedparameters
.
-
Constructor Details
-
MethodInfo
public MethodInfo(String serviceName, String name, int overloadId, TypeSignature returnTypeSignature, Iterable<FieldInfo> parameters, Iterable<TypeSignature> exceptionTypeSignatures, Iterable<EndpointInfo> endpoints, HttpMethod httpMethod, DescriptionInfo descriptionInfo) Creates a new instance. -
MethodInfo
public MethodInfo(String serviceName, String name, int overloadId, TypeSignature returnTypeSignature, Iterable<FieldInfo> parameters, Iterable<EndpointInfo> endpoints, Iterable<String> examplePaths, Iterable<String> exampleQueries, HttpMethod httpMethod, DescriptionInfo descriptionInfo) Creates a new instance. -
MethodInfo
public MethodInfo(String serviceName, String name, TypeSignature returnTypeSignature, Iterable<FieldInfo> parameters, boolean useParameterAsRoot, Iterable<TypeSignature> exceptionTypeSignatures, Iterable<EndpointInfo> endpoints, Iterable<HttpHeaders> exampleHeaders, Iterable<String> exampleRequests, Iterable<String> examplePaths, Iterable<String> exampleQueries, HttpMethod httpMethod, DescriptionInfo descriptionInfo) Creates a new instance.
-
-
Method Details
-
id
Returns the id of this function. It's a form ofserviceName/methodName/httpMethod
. ThemethodName
might have-x
suffix if the method is overloaded. -
name
Returns the name of the function. -
returnTypeSignature
Returns the signature of the return type of the function. -
endpoints
Returns the endpoints for accessing this method. -
parameters
Returns the metadata about the parameters of the function. -
useParameterAsRoot
public boolean useParameterAsRoot()Tells whether theparameters()
is used as the root when creating JSON schema. The size of theparameters()
must be one if this returnstrue
. -
withParameters
Returns a newMethodInfo
with the specifiedparameters
. Returnsthis
if thisMethodInfo
has the sameparameters
. -
exceptionTypeSignatures
Returns the metadata about the exceptions declared by the function. -
exampleHeaders
Returns the example HTTP headers of the method. -
exampleRequests
Returns the list of the example request serialized in a string. The format of the example request string depends on the underlying RPC implementation. -
examplePaths
Returns the example paths of the method. -
exampleQueries
Returns the example queries of the method. -
httpMethod
Returns the HTTP method of this method. -
descriptionInfo
Returns the description information of the function. -
withDescriptionInfo
Returns a newMethodInfo
with the specifiedDescriptionInfo
. Returnsthis
if thisMethodInfo
has the sameDescriptionInfo
. -
equals
-
hashCode
public int hashCode() -
toString
-