ProtoBuf.Reflect.Service.html 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Class: Service</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Class: Service</h1>
  17. <section>
  18. <header>
  19. <h2>
  20. <span class="ancestors"><a href="ProtoBuf.html">ProtoBuf</a><a href="ProtoBuf.Reflect.html">.Reflect</a>.</span>
  21. Service
  22. </h2>
  23. </header>
  24. <article>
  25. <div class="container-overview">
  26. <h4 class="name" id="Service"><span class="type-signature"></span>new Service<span class="signature">(builder<span class="signature-attributes">non-null</span>, root<span class="signature-attributes">non-null</span>, name, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
  27. <div class="description">
  28. <p>Constructs a new Service.</p>
  29. </div>
  30. <h5>Parameters:</h5>
  31. <table class="params">
  32. <thead>
  33. <tr>
  34. <th>Name</th>
  35. <th>Type</th>
  36. <th>Attributes</th>
  37. <th class="last">Description</th>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. <tr>
  42. <td class="name"><code>builder</code></td>
  43. <td class="type">
  44. <span class="param-type"><a href="ProtoBuf.Builder.html">ProtoBuf.Builder</a></span>
  45. </td>
  46. <td class="attributes">
  47. </td>
  48. <td class="description last"><p>Builder reference</p></td>
  49. </tr>
  50. <tr>
  51. <td class="name"><code>root</code></td>
  52. <td class="type">
  53. <span class="param-type"><a href="ProtoBuf.Reflect.Namespace.html">ProtoBuf.Reflect.Namespace</a></span>
  54. </td>
  55. <td class="attributes">
  56. </td>
  57. <td class="description last"><p>Root</p></td>
  58. </tr>
  59. <tr>
  60. <td class="name"><code>name</code></td>
  61. <td class="type">
  62. <span class="param-type">string</span>
  63. </td>
  64. <td class="attributes">
  65. </td>
  66. <td class="description last"><p>Service name</p></td>
  67. </tr>
  68. <tr>
  69. <td class="name"><code>options</code></td>
  70. <td class="type">
  71. <span class="param-type">Object.&lt;string, *></span>
  72. </td>
  73. <td class="attributes">
  74. &lt;optional><br>
  75. </td>
  76. <td class="description last"><p>Options</p></td>
  77. </tr>
  78. </tbody>
  79. </table>
  80. <dl class="details">
  81. <dt class="tag-source">Source:</dt>
  82. <dd class="tag-source"><ul class="dummy"><li>
  83. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3969">line 3969</a>
  84. </li></ul></dd>
  85. </dl>
  86. </div>
  87. <h3 class="subsection-title">Extends</h3>
  88. <ul>
  89. <li><a href="ProtoBuf.Reflect.Namespace.html">ProtoBuf.Reflect.Namespace</a></li>
  90. </ul>
  91. <h3 class="subsection-title">Classes</h3>
  92. <dl>
  93. <dt><a href="ProtoBuf.Reflect.Service.Method.html">Method</a></dt>
  94. <dd></dd>
  95. <dt><a href="ProtoBuf.Reflect.Service.RPCMethod.html">RPCMethod</a></dt>
  96. <dd></dd>
  97. </dl>
  98. <h3 class="subsection-title">Members</h3>
  99. <h4 class="name" id="builder"><span class="type-signature">(non-null) </span>builder<span class="type-signature"> :<a href="ProtoBuf.Builder.html">ProtoBuf.Builder</a></span></h4>
  100. <div class="description">
  101. <p>Builder reference.</p>
  102. </div>
  103. <h5>Type:</h5>
  104. <ul>
  105. <li>
  106. <span class="param-type"><a href="ProtoBuf.Builder.html">ProtoBuf.Builder</a></span>
  107. </li>
  108. </ul>
  109. <dl class="details">
  110. <dt class="inherited-from">Inherited From:</dt>
  111. <dd class="inherited-from"><ul class="dummy"><li>
  112. <a href="ProtoBuf.Reflect.T.html#builder">ProtoBuf.Reflect.T#builder</a>
  113. </li></ul></dd>
  114. <dt class="tag-source">Source:</dt>
  115. <dd class="tag-source"><ul class="dummy"><li>
  116. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1417">line 1417</a>
  117. </li></ul></dd>
  118. </dl>
  119. <h4 class="name" id="children"><span class="type-signature">(non-null) </span>children<span class="type-signature"> :Array.&lt;<a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a>></span></h4>
  120. <div class="description">
  121. <p>Children inside the namespace.</p>
  122. </div>
  123. <h5>Type:</h5>
  124. <ul>
  125. <li>
  126. <span class="param-type">Array.&lt;<a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a>></span>
  127. </li>
  128. </ul>
  129. <dl class="details">
  130. <dt class="inherited-from">Inherited From:</dt>
  131. <dd class="inherited-from"><ul class="dummy"><li>
  132. <a href="ProtoBuf.Reflect.Namespace.html#children">ProtoBuf.Reflect.Namespace#children</a>
  133. </li></ul></dd>
  134. <dt class="tag-source">Source:</dt>
  135. <dd class="tag-source"><ul class="dummy"><li>
  136. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1512">line 1512</a>
  137. </li></ul></dd>
  138. </dl>
  139. <h4 class="name" id="className"><span class="type-signature"></span>className<span class="type-signature"> :string</span></h4>
  140. <div class="description">
  141. <p>Fully qualified class name</p>
  142. </div>
  143. <h5>Type:</h5>
  144. <ul>
  145. <li>
  146. <span class="param-type">string</span>
  147. </li>
  148. </ul>
  149. <dl class="details">
  150. <dt class="tag-overrides">Overrides:</dt>
  151. <dd class="tag-overrides"><ul class="dummy"><li>
  152. <a href="ProtoBuf.Reflect.Namespace.html#className">ProtoBuf.Reflect.Namespace#className</a>
  153. </li></ul></dd>
  154. <dt class="tag-source">Source:</dt>
  155. <dd class="tag-source"><ul class="dummy"><li>
  156. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1438">line 1438</a>
  157. </li></ul></dd>
  158. </dl>
  159. <h4 class="name" id="clazz"><span class="type-signature">(nullable) </span>clazz<span class="type-signature"> :function</span></h4>
  160. <div class="description">
  161. <p>Built runtime service class.</p>
  162. </div>
  163. <h5>Type:</h5>
  164. <ul>
  165. <li>
  166. <span class="param-type">function</span>
  167. </li>
  168. </ul>
  169. <dl class="details">
  170. <dt class="tag-source">Source:</dt>
  171. <dd class="tag-source"><ul class="dummy"><li>
  172. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3981">line 3981</a>
  173. </li></ul></dd>
  174. </dl>
  175. <h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"> :string</span></h4>
  176. <div class="description">
  177. <p>Object name in namespace.</p>
  178. </div>
  179. <h5>Type:</h5>
  180. <ul>
  181. <li>
  182. <span class="param-type">string</span>
  183. </li>
  184. </ul>
  185. <dl class="details">
  186. <dt class="inherited-from">Inherited From:</dt>
  187. <dd class="inherited-from"><ul class="dummy"><li>
  188. <a href="ProtoBuf.Reflect.T.html#name">ProtoBuf.Reflect.T#name</a>
  189. </li></ul></dd>
  190. <dt class="tag-source">Source:</dt>
  191. <dd class="tag-source"><ul class="dummy"><li>
  192. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1431">line 1431</a>
  193. </li></ul></dd>
  194. </dl>
  195. <h4 class="name" id="options"><span class="type-signature">(non-null) </span>options<span class="type-signature"> :Object.&lt;string, *></span></h4>
  196. <div class="description">
  197. <p>Options.</p>
  198. </div>
  199. <h5>Type:</h5>
  200. <ul>
  201. <li>
  202. <span class="param-type">Object.&lt;string, *></span>
  203. </li>
  204. </ul>
  205. <dl class="details">
  206. <dt class="inherited-from">Inherited From:</dt>
  207. <dd class="inherited-from"><ul class="dummy"><li>
  208. <a href="ProtoBuf.Reflect.Namespace.html#options">ProtoBuf.Reflect.Namespace#options</a>
  209. </li></ul></dd>
  210. <dt class="tag-source">Source:</dt>
  211. <dd class="tag-source"><ul class="dummy"><li>
  212. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1518">line 1518</a>
  213. </li></ul></dd>
  214. </dl>
  215. <h4 class="name" id="parent"><span class="type-signature">(nullable) </span>parent<span class="type-signature"> :<a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></span></h4>
  216. <div class="description">
  217. <p>Parent object.</p>
  218. </div>
  219. <h5>Type:</h5>
  220. <ul>
  221. <li>
  222. <span class="param-type"><a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></span>
  223. </li>
  224. </ul>
  225. <dl class="details">
  226. <dt class="inherited-from">Inherited From:</dt>
  227. <dd class="inherited-from"><ul class="dummy"><li>
  228. <a href="ProtoBuf.Reflect.T.html#parent">ProtoBuf.Reflect.T#parent</a>
  229. </li></ul></dd>
  230. <dt class="tag-source">Source:</dt>
  231. <dd class="tag-source"><ul class="dummy"><li>
  232. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1424">line 1424</a>
  233. </li></ul></dd>
  234. </dl>
  235. <h4 class="name" id="syntax"><span class="type-signature">(non-null) </span>syntax<span class="type-signature"> :string</span></h4>
  236. <div class="description">
  237. <p>Syntax level (e.g., proto2 or proto3).</p>
  238. </div>
  239. <h5>Type:</h5>
  240. <ul>
  241. <li>
  242. <span class="param-type">string</span>
  243. </li>
  244. </ul>
  245. <dl class="details">
  246. <dt class="inherited-from">Inherited From:</dt>
  247. <dd class="inherited-from"><ul class="dummy"><li>
  248. <a href="ProtoBuf.Reflect.Namespace.html#syntax">ProtoBuf.Reflect.Namespace#syntax</a>
  249. </li></ul></dd>
  250. <dt class="tag-source">Source:</dt>
  251. <dd class="tag-source"><ul class="dummy"><li>
  252. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1524">line 1524</a>
  253. </li></ul></dd>
  254. </dl>
  255. <h3 class="subsection-title">Methods</h3>
  256. <h4 class="name" id="addChild"><span class="type-signature"></span>addChild<span class="signature">(child)</span><span class="type-signature"></span></h4>
  257. <div class="description">
  258. <p>Adds a child to the namespace.</p>
  259. </div>
  260. <h5>Parameters:</h5>
  261. <table class="params">
  262. <thead>
  263. <tr>
  264. <th>Name</th>
  265. <th>Type</th>
  266. <th class="last">Description</th>
  267. </tr>
  268. </thead>
  269. <tbody>
  270. <tr>
  271. <td class="name"><code>child</code></td>
  272. <td class="type">
  273. <span class="param-type"><a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></span>
  274. </td>
  275. <td class="description last"><p>Child</p></td>
  276. </tr>
  277. </tbody>
  278. </table>
  279. <dl class="details">
  280. <dt class="inherited-from">Inherited From:</dt>
  281. <dd class="inherited-from"><ul class="dummy"><li>
  282. <a href="ProtoBuf.Reflect.Namespace.html#addChild">ProtoBuf.Reflect.Namespace#addChild</a>
  283. </li></ul></dd>
  284. <dt class="tag-source">Source:</dt>
  285. <dd class="tag-source"><ul class="dummy"><li>
  286. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1556">line 1556</a>
  287. </li></ul></dd>
  288. </dl>
  289. <h5>Throws:</h5>
  290. <dl>
  291. <dt>
  292. <div class="param-desc">
  293. <p>If the child cannot be added (duplicate)</p>
  294. </div>
  295. </dt>
  296. <dd></dd>
  297. <dt>
  298. <dl>
  299. <dt>
  300. Type
  301. </dt>
  302. <dd>
  303. <span class="param-type">Error</span>
  304. </dd>
  305. </dl>
  306. </dt>
  307. <dd></dd>
  308. </dl>
  309. <h4 class="name" id="build"><span class="type-signature"></span>build<span class="signature">(rebuild<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {function}</span></h4>
  310. <div class="description">
  311. <p>Builds the service and returns the runtime counterpart, which is a fully functional class.</p>
  312. </div>
  313. <h5>Parameters:</h5>
  314. <table class="params">
  315. <thead>
  316. <tr>
  317. <th>Name</th>
  318. <th>Type</th>
  319. <th>Attributes</th>
  320. <th class="last">Description</th>
  321. </tr>
  322. </thead>
  323. <tbody>
  324. <tr>
  325. <td class="name"><code>rebuild</code></td>
  326. <td class="type">
  327. <span class="param-type">boolean</span>
  328. </td>
  329. <td class="attributes">
  330. &lt;optional><br>
  331. </td>
  332. <td class="description last"><p>Whether to rebuild or not</p></td>
  333. </tr>
  334. </tbody>
  335. </table>
  336. <dl class="details">
  337. <dt class="tag-overrides">Overrides:</dt>
  338. <dd class="tag-overrides"><ul class="dummy"><li>
  339. <a href="ProtoBuf.Reflect.Namespace.html#build">ProtoBuf.Reflect.Namespace#build</a>
  340. </li></ul></dd>
  341. <dt class="tag-source">Source:</dt>
  342. <dd class="tag-source"><ul class="dummy"><li>
  343. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3998">line 3998</a>
  344. </li></ul></dd>
  345. <dt class="tag-see">See:</dt>
  346. <dd class="tag-see">
  347. <ul>
  348. <li><a href="ProtoBuf.Builder.Service.html">ProtoBuf.Builder.Service</a></li>
  349. </ul>
  350. </dd>
  351. </dl>
  352. <h5>Throws:</h5>
  353. <dl>
  354. <dt>
  355. <div class="param-desc">
  356. <p>If the message cannot be built</p>
  357. </div>
  358. </dt>
  359. <dd></dd>
  360. <dt>
  361. <dl>
  362. <dt>
  363. Type
  364. </dt>
  365. <dd>
  366. <span class="param-type">Error</span>
  367. </dd>
  368. </dl>
  369. </dt>
  370. <dd></dd>
  371. </dl>
  372. <h5>Returns:</h5>
  373. <div class="param-desc">
  374. <p>Service class</p>
  375. </div>
  376. <dl>
  377. <dt>
  378. Type
  379. </dt>
  380. <dd>
  381. <span class="param-type">function</span>
  382. </dd>
  383. </dl>
  384. <h4 class="name" id="buildOpt"><span class="type-signature"></span>buildOpt<span class="signature">()</span><span class="type-signature"> &rarr; {Object.&lt;string, *>}</span></h4>
  385. <div class="description">
  386. <p>Builds the namespace's '$options' property.</p>
  387. </div>
  388. <dl class="details">
  389. <dt class="inherited-from">Inherited From:</dt>
  390. <dd class="inherited-from"><ul class="dummy"><li>
  391. <a href="ProtoBuf.Reflect.Namespace.html#buildOpt">ProtoBuf.Reflect.Namespace#buildOpt</a>
  392. </li></ul></dd>
  393. <dt class="tag-source">Source:</dt>
  394. <dd class="tag-source"><ul class="dummy"><li>
  395. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1666">line 1666</a>
  396. </li></ul></dd>
  397. </dl>
  398. <h5>Returns:</h5>
  399. <dl>
  400. <dt>
  401. Type
  402. </dt>
  403. <dd>
  404. <span class="param-type">Object.&lt;string, *></span>
  405. </dd>
  406. </dl>
  407. <h4 class="name" id="fqn"><span class="type-signature"></span>fqn<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
  408. <div class="description">
  409. <p>Returns the fully qualified name of this object.</p>
  410. </div>
  411. <dl class="details">
  412. <dt class="inherited-from">Inherited From:</dt>
  413. <dd class="inherited-from"><ul class="dummy"><li>
  414. <a href="ProtoBuf.Reflect.T.html#fqn">ProtoBuf.Reflect.T#fqn</a>
  415. </li></ul></dd>
  416. <dt class="tag-source">Source:</dt>
  417. <dd class="tag-source"><ul class="dummy"><li>
  418. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1452">line 1452</a>
  419. </li></ul></dd>
  420. </dl>
  421. <h5>Returns:</h5>
  422. <div class="param-desc">
  423. <p>Fully qualified name as of &quot;.PATH.TO.THIS&quot;</p>
  424. </div>
  425. <dl>
  426. <dt>
  427. Type
  428. </dt>
  429. <dd>
  430. <span class="param-type">string</span>
  431. </dd>
  432. </dl>
  433. <h4 class="name" id="getChild"><span class="type-signature"></span>getChild<span class="signature">(nameOrId)</span><span class="type-signature"> &rarr; (nullable) {<a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a>}</span></h4>
  434. <div class="description">
  435. <p>Gets a child by its name or id.</p>
  436. </div>
  437. <h5>Parameters:</h5>
  438. <table class="params">
  439. <thead>
  440. <tr>
  441. <th>Name</th>
  442. <th>Type</th>
  443. <th class="last">Description</th>
  444. </tr>
  445. </thead>
  446. <tbody>
  447. <tr>
  448. <td class="name"><code>nameOrId</code></td>
  449. <td class="type">
  450. <span class="param-type">string</span>
  451. |
  452. <span class="param-type">number</span>
  453. </td>
  454. <td class="description last"><p>Child name or id</p></td>
  455. </tr>
  456. </tbody>
  457. </table>
  458. <dl class="details">
  459. <dt class="inherited-from">Inherited From:</dt>
  460. <dd class="inherited-from"><ul class="dummy"><li>
  461. <a href="ProtoBuf.Reflect.Namespace.html#getChild">ProtoBuf.Reflect.Namespace#getChild</a>
  462. </li></ul></dd>
  463. <dt class="tag-source">Source:</dt>
  464. <dd class="tag-source"><ul class="dummy"><li>
  465. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1576">line 1576</a>
  466. </li></ul></dd>
  467. </dl>
  468. <h5>Returns:</h5>
  469. <div class="param-desc">
  470. <p>The child or null if not found</p>
  471. </div>
  472. <dl>
  473. <dt>
  474. Type
  475. </dt>
  476. <dd>
  477. <span class="param-type"><a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></span>
  478. </dd>
  479. </dl>
  480. <h4 class="name" id="getChildren"><span class="type-signature"></span>getChildren<span class="signature">(type<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array.&lt;<a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a>>}</span></h4>
  481. <div class="description">
  482. <p>Returns an array of the namespace's children.</p>
  483. </div>
  484. <h5>Parameters:</h5>
  485. <table class="params">
  486. <thead>
  487. <tr>
  488. <th>Name</th>
  489. <th>Type</th>
  490. <th>Attributes</th>
  491. <th class="last">Description</th>
  492. </tr>
  493. </thead>
  494. <tbody>
  495. <tr>
  496. <td class="name"><code>type</code></td>
  497. <td class="type">
  498. <span class="param-type"><a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></span>
  499. </td>
  500. <td class="attributes">
  501. &lt;optional><br>
  502. </td>
  503. <td class="description last"><p>Filter type (returns instances of this type only). Defaults to null (all children).</p></td>
  504. </tr>
  505. </tbody>
  506. </table>
  507. <dl class="details">
  508. <dt class="inherited-from">Inherited From:</dt>
  509. <dd class="inherited-from"><ul class="dummy"><li>
  510. <a href="ProtoBuf.Reflect.Namespace.html#getChildren">ProtoBuf.Reflect.Namespace#getChildren</a>
  511. </li></ul></dd>
  512. <dt class="tag-source">Source:</dt>
  513. <dd class="tag-source"><ul class="dummy"><li>
  514. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1539">line 1539</a>
  515. </li></ul></dd>
  516. </dl>
  517. <h5>Returns:</h5>
  518. <dl>
  519. <dt>
  520. Type
  521. </dt>
  522. <dd>
  523. <span class="param-type">Array.&lt;<a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a>></span>
  524. </dd>
  525. </dl>
  526. <h4 class="name" id="getOption"><span class="type-signature"></span>getOption<span class="signature">(name<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*|Object.&lt;string, *>}</span></h4>
  527. <div class="description">
  528. <p>Gets the value assigned to the option with the specified name.</p>
  529. </div>
  530. <h5>Parameters:</h5>
  531. <table class="params">
  532. <thead>
  533. <tr>
  534. <th>Name</th>
  535. <th>Type</th>
  536. <th>Attributes</th>
  537. <th class="last">Description</th>
  538. </tr>
  539. </thead>
  540. <tbody>
  541. <tr>
  542. <td class="name"><code>name</code></td>
  543. <td class="type">
  544. <span class="param-type">string</span>
  545. </td>
  546. <td class="attributes">
  547. &lt;optional><br>
  548. </td>
  549. <td class="description last"><p>Returns the option value if specified, otherwise all options are returned.</p></td>
  550. </tr>
  551. </tbody>
  552. </table>
  553. <dl class="details">
  554. <dt class="inherited-from">Inherited From:</dt>
  555. <dd class="inherited-from"><ul class="dummy"><li>
  556. <a href="ProtoBuf.Reflect.Namespace.html#getOption">ProtoBuf.Reflect.Namespace#getOption</a>
  557. </li></ul></dd>
  558. <dt class="tag-source">Source:</dt>
  559. <dd class="tag-source"><ul class="dummy"><li>
  560. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1687">line 1687</a>
  561. </li></ul></dd>
  562. </dl>
  563. <h5>Returns:</h5>
  564. <div class="param-desc">
  565. <p>null} Option value or NULL if there is no such option</p>
  566. </div>
  567. <dl>
  568. <dt>
  569. Type
  570. </dt>
  571. <dd>
  572. <span class="param-type">*</span>
  573. |
  574. <span class="param-type">Object.&lt;string, *></span>
  575. </dd>
  576. </dl>
  577. <h4 class="name" id="qn"><span class="type-signature"></span>qn<span class="signature">(t<span class="signature-attributes">non-null</span>)</span><span class="type-signature"> &rarr; {string}</span></h4>
  578. <div class="description">
  579. <p>Determines the shortest qualified name of the specified type, if any, relative to this namespace.</p>
  580. </div>
  581. <h5>Parameters:</h5>
  582. <table class="params">
  583. <thead>
  584. <tr>
  585. <th>Name</th>
  586. <th>Type</th>
  587. <th class="last">Description</th>
  588. </tr>
  589. </thead>
  590. <tbody>
  591. <tr>
  592. <td class="name"><code>t</code></td>
  593. <td class="type">
  594. <span class="param-type"><a href="ProtoBuf.Reflect.T.html">ProtoBuf.Reflect.T</a></span>
  595. </td>
  596. <td class="description last"><p>Reflection type</p></td>
  597. </tr>
  598. </tbody>
  599. </table>
  600. <dl class="details">
  601. <dt class="inherited-from">Inherited From:</dt>
  602. <dd class="inherited-from"><ul class="dummy"><li>
  603. <a href="ProtoBuf.Reflect.Namespace.html#qn">ProtoBuf.Reflect.Namespace#qn</a>
  604. </li></ul></dd>
  605. <dt class="tag-source">Source:</dt>
  606. <dd class="tag-source"><ul class="dummy"><li>
  607. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1629">line 1629</a>
  608. </li></ul></dd>
  609. </dl>
  610. <h5>Returns:</h5>
  611. <div class="param-desc">
  612. <p>The shortest qualified name or, if there is none, the fqn</p>
  613. </div>
  614. <dl>
  615. <dt>
  616. Type
  617. </dt>
  618. <dd>
  619. <span class="param-type">string</span>
  620. </dd>
  621. </dl>
  622. <h4 class="name" id="resolve"><span class="type-signature"></span>resolve<span class="signature">(qn, excludeNonNamespace<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; (nullable) {<a href="ProtoBuf.Reflect.Namespace.html">ProtoBuf.Reflect.Namespace</a>}</span></h4>
  623. <div class="description">
  624. <p>Resolves a reflect object inside of this namespace.</p>
  625. </div>
  626. <h5>Parameters:</h5>
  627. <table class="params">
  628. <thead>
  629. <tr>
  630. <th>Name</th>
  631. <th>Type</th>
  632. <th>Attributes</th>
  633. <th class="last">Description</th>
  634. </tr>
  635. </thead>
  636. <tbody>
  637. <tr>
  638. <td class="name"><code>qn</code></td>
  639. <td class="type">
  640. <span class="param-type">string</span>
  641. |
  642. <span class="param-type">!Array.&lt;string></span>
  643. </td>
  644. <td class="attributes">
  645. </td>
  646. <td class="description last"><p>Qualified name to resolve</p></td>
  647. </tr>
  648. <tr>
  649. <td class="name"><code>excludeNonNamespace</code></td>
  650. <td class="type">
  651. <span class="param-type">boolean</span>
  652. </td>
  653. <td class="attributes">
  654. &lt;optional><br>
  655. </td>
  656. <td class="description last"><p>Excludes non-namespace types, defaults to <code>false</code></p></td>
  657. </tr>
  658. </tbody>
  659. </table>
  660. <dl class="details">
  661. <dt class="inherited-from">Inherited From:</dt>
  662. <dd class="inherited-from"><ul class="dummy"><li>
  663. <a href="ProtoBuf.Reflect.Namespace.html#resolve">ProtoBuf.Reflect.Namespace#resolve</a>
  664. </li></ul></dd>
  665. <dt class="tag-source">Source:</dt>
  666. <dd class="tag-source"><ul class="dummy"><li>
  667. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1591">line 1591</a>
  668. </li></ul></dd>
  669. </dl>
  670. <h5>Returns:</h5>
  671. <div class="param-desc">
  672. <p>The resolved type or null if not found</p>
  673. </div>
  674. <dl>
  675. <dt>
  676. Type
  677. </dt>
  678. <dd>
  679. <span class="param-type"><a href="ProtoBuf.Reflect.Namespace.html">ProtoBuf.Reflect.Namespace</a></span>
  680. </dd>
  681. </dl>
  682. <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">(includeClass<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
  683. <div class="description">
  684. <p>Returns a string representation of this Reflect object (its fully qualified name).</p>
  685. </div>
  686. <h5>Parameters:</h5>
  687. <table class="params">
  688. <thead>
  689. <tr>
  690. <th>Name</th>
  691. <th>Type</th>
  692. <th>Attributes</th>
  693. <th class="last">Description</th>
  694. </tr>
  695. </thead>
  696. <tbody>
  697. <tr>
  698. <td class="name"><code>includeClass</code></td>
  699. <td class="type">
  700. <span class="param-type">boolean</span>
  701. </td>
  702. <td class="attributes">
  703. &lt;optional><br>
  704. </td>
  705. <td class="description last"><p>Set to true to include the class name. Defaults to false.</p></td>
  706. </tr>
  707. </tbody>
  708. </table>
  709. <dl class="details">
  710. <dt class="inherited-from">Inherited From:</dt>
  711. <dd class="inherited-from"><ul class="dummy"><li>
  712. <a href="ProtoBuf.Reflect.T.html#toString">ProtoBuf.Reflect.T#toString</a>
  713. </li></ul></dd>
  714. <dt class="tag-source">Source:</dt>
  715. <dd class="tag-source"><ul class="dummy"><li>
  716. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line1470">line 1470</a>
  717. </li></ul></dd>
  718. </dl>
  719. <h5>Returns:</h5>
  720. <div class="param-desc">
  721. <p>String representation</p>
  722. </div>
  723. </article>
  724. </section>
  725. </div>
  726. <nav>
  727. <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ProtoBuf.Builder.html">Builder</a></li><li><a href="ProtoBuf.Builder.Message.html">Message</a></li><li><a href="ProtoBuf.Builder.Service.html">Service</a></li><li><a href="ProtoBuf.DotProto.Parser.html">Parser</a></li><li><a href="ProtoBuf.DotProto.Tokenizer.html">Tokenizer</a></li><li><a href="ProtoBuf.Map.html">Map</a></li><li><a href="ProtoBuf.Reflect.Element.html">Element</a></li><li><a href="ProtoBuf.Reflect.Enum.html">Enum</a></li><li><a href="ProtoBuf.Reflect.Enum.Value.html">Value</a></li><li><a href="ProtoBuf.Reflect.Extension.html">Extension</a></li><li><a href="ProtoBuf.Reflect.Message.html">Message</a></li><li><a href="ProtoBuf.Reflect.Message.ExtensionField.html">ExtensionField</a></li><li><a href="ProtoBuf.Reflect.Message.Field.html">Field</a></li><li><a href="ProtoBuf.Reflect.Message.OneOf.html">OneOf</a></li><li><a href="ProtoBuf.Reflect.Namespace.html">Namespace</a></li><li><a href="ProtoBuf.Reflect.Service.html">Service</a></li><li><a href="ProtoBuf.Reflect.Service.Method.html">Method</a></li><li><a href="ProtoBuf.Reflect.Service.RPCMethod.html">RPCMethod</a></li><li><a href="ProtoBuf.Reflect.T.html">T</a></li></ul><h3>Namespaces</h3><ul><li><a href="ProtoBuf.html">ProtoBuf</a></li><li><a href="ProtoBuf.DotProto.html">DotProto</a></li><li><a href="ProtoBuf.Reflect.html">Reflect</a></li><li><a href="ProtoBuf.Util.html">Util</a></li></ul>
  728. </nav>
  729. <br class="clear">
  730. <footer>
  731. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.3</a> on Fri Jan 27 2017 17:03:55 GMT+0100 (Mitteleuropäische Zeit)
  732. </footer>
  733. <script> prettyPrint(); </script>
  734. <script src="scripts/linenumber.js"> </script>
  735. </body>
  736. </html>