Constructs a new service method instance.
| Name | Type | Description |
|---|---|---|
name |
string |
Method name |
type |
string | undefined |
Method type, usually |
requestType |
string |
Request message type |
responseType |
string |
Response message type |
requestStream |
boolean | Object.<string, *> |
optional
Whether the request is streamed |
responseStream |
boolean | Object.<string, *> |
optional
Whether the response is streamed |
options |
Object.<string, *> |
optional
Declared options |
comment |
string |
optional
The comment for this method |
parsedOptions |
Array.<Object.<string, *>> |
optional
Declared options, properly parsed into objects |
Extends
Members
-
comment { string | null }
-
Comment for this method
-
filename { string | null }
-
Defining file name.
-
fullName readonly{ string }
-
Full name including leading dot.
-
name { string }
-
Unique name within its namespace.
-
options { Object<string, *> | undefined }
-
Options.
-
parent { Namespace | null }
-
Parent namespace.
-
parsedOptions { Object<string, *>[] | undefined }
-
Options properly parsed into objects
-
requestStream { boolean | undefined }
-
Whether requests are streamed or not.
-
requestType { string }
-
Request type.
-
resolved { boolean }
-
Whether already resolved or not.
-
resolvedRequestType { Type | null }
-
Resolved request type.
-
resolvedResponseType { Type | null }
-
Resolved response type.
-
responseStream { boolean | undefined }
-
Whether responses are streamed or not.
-
responseType { string }
-
Response type.
-
root readonly{ Root }
-
Reference to the root namespace.
-
type { string }
-
Method type.
Methods
-
Gets an option value.
Name Type Description namestring Option name
Returns:
Type Description * Option value or undefinedif not set -
Called when this object is added to a parent.
Name Type Description parentReflectionObject Parent added to
Returns:
Type Description undefined -
Called when this object is removed from a parent.
Name Type Description parentReflectionObject Parent removed from
Returns:
Type Description undefined -
inherited resolve(){ ReflectionObject }
-
Resolves this objects type references.
Returns:
Type Description ReflectionObject this -
inherited setOption(name, value, ifNotSet){ ReflectionObject }
-
Sets an option.
Name Type Description namestring Option name
value* Option value
ifNotSetboolean | undefined optional Sets the option only if it isn't currently set
Returns:
Type Description ReflectionObject this -
inherited setOptions(options, ifNotSet){ ReflectionObject }
-
Sets multiple options.
Name Type Description optionsObject.<string, *> Options to set
ifNotSetboolean optional Sets an option only if it isn't currently set
Returns:
Type Description ReflectionObject this -
inherited setParsedOption(name, value, propName){ ReflectionObject }
-
Sets a parsed option.
Name Type Description namestring parsed Option name
value* Option value
propNamestring dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value
Returns:
Type Description ReflectionObject this -
Converts this method to a method descriptor.
Name Type Description toJSONOptionsIToJSONOptions optional JSON conversion options
Returns:
Type Description IMethod Method descriptor -
Converts this instance to its string representation.
Returns:
Type Description string Class name[, space, full name] -
Constructs a method from a method descriptor.
Name Type Description namestring Method name
jsonIMethod Method descriptor
Throws:
Type Description TypeError If arguments are invalid
Returns:
Type Description Method Created method