Network programming assignment for University
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

592 lines
32 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="de">
  4. <head>
  5. <!-- Generated by javadoc -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  7. <title>DefaultParser (Apache Commons CLI 1.4 API)</title>
  8. <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
  9. <script type="text/javascript" src="../../../../script.js"></script>
  10. </head>
  11. <body>
  12. <script type="text/javascript"><!--
  13. try {
  14. if (location.href.indexOf('is-external=true') == -1) {
  15. parent.document.title="DefaultParser (Apache Commons CLI 1.4 API)";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10};
  22. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
  23. var altColor = "altColor";
  24. var rowColor = "rowColor";
  25. var tableTab = "tableTab";
  26. var activeTableTab = "activeTableTab";
  27. </script>
  28. <noscript>
  29. <div>JavaScript is disabled on your browser.</div>
  30. </noscript>
  31. <!-- ========= START OF TOP NAVBAR ======= -->
  32. <div class="topNav"><a name="navbar.top">
  33. <!-- -->
  34. </a>
  35. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  36. <a name="navbar.top.firstrow">
  37. <!-- -->
  38. </a>
  39. <ul class="navList" title="Navigation">
  40. <li><a href="../../../../org/apache/commons/cli/package-summary.html">Package</a></li>
  41. <li class="navBarCell1Rev">Class</li>
  42. <li><a href="class-use/DefaultParser.html">Use</a></li>
  43. <li><a href="package-tree.html">Tree</a></li>
  44. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  45. <li><a href="../../../../index-all.html">Index</a></li>
  46. <li><a href="../../../../help-doc.html">Help</a></li>
  47. </ul>
  48. </div>
  49. <div class="subNav">
  50. <ul class="navList">
  51. <li><a href="../../../../org/apache/commons/cli/CommandLineParser.html" title="interface in org.apache.commons.cli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  52. <li><a href="../../../../org/apache/commons/cli/GnuParser.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  53. </ul>
  54. <ul class="navList">
  55. <li><a href="../../../../index.html?org/apache/commons/cli/DefaultParser.html" target="_top">Frames</a></li>
  56. <li><a href="DefaultParser.html" target="_top">No&nbsp;Frames</a></li>
  57. </ul>
  58. <ul class="navList" id="allclasses_navbar_top">
  59. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  60. </ul>
  61. <div>
  62. <script type="text/javascript"><!--
  63. allClassesLink = document.getElementById("allclasses_navbar_top");
  64. if(window==top) {
  65. allClassesLink.style.display = "block";
  66. }
  67. else {
  68. allClassesLink.style.display = "none";
  69. }
  70. //-->
  71. </script>
  72. </div>
  73. <div>
  74. <ul class="subNavList">
  75. <li>Summary:&nbsp;</li>
  76. <li>Nested&nbsp;|&nbsp;</li>
  77. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  78. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  79. <li><a href="#method.summary">Method</a></li>
  80. </ul>
  81. <ul class="subNavList">
  82. <li>Detail:&nbsp;</li>
  83. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  84. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  85. <li><a href="#method.detail">Method</a></li>
  86. </ul>
  87. </div>
  88. <a name="skip.navbar.top">
  89. <!-- -->
  90. </a></div>
  91. <!-- ========= END OF TOP NAVBAR ========= -->
  92. <!-- ======== START OF CLASS DATA ======== -->
  93. <div class="header">
  94. <div class="subTitle">org.apache.commons.cli</div>
  95. <h2 title="Class DefaultParser" class="title">Class DefaultParser</h2>
  96. </div>
  97. <div class="contentContainer">
  98. <ul class="inheritance">
  99. <li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
  100. <li>
  101. <ul class="inheritance">
  102. <li>org.apache.commons.cli.DefaultParser</li>
  103. </ul>
  104. </li>
  105. </ul>
  106. <div class="description">
  107. <ul class="blockList">
  108. <li class="blockList">
  109. <dl>
  110. <dt>All Implemented Interfaces:</dt>
  111. <dd><a href="../../../../org/apache/commons/cli/CommandLineParser.html" title="interface in org.apache.commons.cli">CommandLineParser</a></dd>
  112. </dl>
  113. <hr>
  114. <br>
  115. <pre>public class <span class="typeNameLabel">DefaultParser</span>
  116. extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
  117. implements <a href="../../../../org/apache/commons/cli/CommandLineParser.html" title="interface in org.apache.commons.cli">CommandLineParser</a></pre>
  118. <div class="block">Default parser.</div>
  119. <dl>
  120. <dt><span class="simpleTagLabel">Since:</span></dt>
  121. <dd>1.3</dd>
  122. <dt><span class="simpleTagLabel">Version:</span></dt>
  123. <dd>$Id: DefaultParser.java 1783175 2017-02-16 07:52:05Z britter $</dd>
  124. </dl>
  125. </li>
  126. </ul>
  127. </div>
  128. <div class="summary">
  129. <ul class="blockList">
  130. <li class="blockList">
  131. <!-- =========== FIELD SUMMARY =========== -->
  132. <ul class="blockList">
  133. <li class="blockList"><a name="field.summary">
  134. <!-- -->
  135. </a>
  136. <h3>Field Summary</h3>
  137. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
  138. <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  139. <tr>
  140. <th class="colFirst" scope="col">Modifier and Type</th>
  141. <th class="colLast" scope="col">Field and Description</th>
  142. </tr>
  143. <tr class="altColor">
  144. <td class="colFirst"><code>protected <a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a></code></td>
  145. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#cmd">cmd</a></span></code>
  146. <div class="block">The command-line instance.</div>
  147. </td>
  148. </tr>
  149. <tr class="rowColor">
  150. <td class="colFirst"><code>protected <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a></code></td>
  151. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#currentOption">currentOption</a></span></code>
  152. <div class="block">The last option parsed.</div>
  153. </td>
  154. </tr>
  155. <tr class="altColor">
  156. <td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
  157. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#currentToken">currentToken</a></span></code>
  158. <div class="block">The token currently processed.</div>
  159. </td>
  160. </tr>
  161. <tr class="rowColor">
  162. <td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a></code></td>
  163. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#expectedOpts">expectedOpts</a></span></code>
  164. <div class="block">The required options and groups expected to be found when parsing the command line.</div>
  165. </td>
  166. </tr>
  167. <tr class="altColor">
  168. <td class="colFirst"><code>protected <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a></code></td>
  169. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#options">options</a></span></code>
  170. <div class="block">The current options.</div>
  171. </td>
  172. </tr>
  173. <tr class="rowColor">
  174. <td class="colFirst"><code>protected boolean</code></td>
  175. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#skipParsing">skipParsing</a></span></code>
  176. <div class="block">Flag indicating if tokens should no longer be analyzed and simply added as arguments of the command line.</div>
  177. </td>
  178. </tr>
  179. <tr class="altColor">
  180. <td class="colFirst"><code>protected boolean</code></td>
  181. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#stopAtNonOption">stopAtNonOption</a></span></code>
  182. <div class="block">Flag indicating how unrecognized tokens are handled.</div>
  183. </td>
  184. </tr>
  185. </table>
  186. </li>
  187. </ul>
  188. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  189. <ul class="blockList">
  190. <li class="blockList"><a name="constructor.summary">
  191. <!-- -->
  192. </a>
  193. <h3>Constructor Summary</h3>
  194. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  195. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  196. <tr>
  197. <th class="colOne" scope="col">Constructor and Description</th>
  198. </tr>
  199. <tr class="altColor">
  200. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#DefaultParser--">DefaultParser</a></span>()</code>&nbsp;</td>
  201. </tr>
  202. </table>
  203. </li>
  204. </ul>
  205. <!-- ========== METHOD SUMMARY =========== -->
  206. <ul class="blockList">
  207. <li class="blockList"><a name="method.summary">
  208. <!-- -->
  209. </a>
  210. <h3>Method Summary</h3>
  211. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  212. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  213. <tr>
  214. <th class="colFirst" scope="col">Modifier and Type</th>
  215. <th class="colLast" scope="col">Method and Description</th>
  216. </tr>
  217. <tr id="i0" class="altColor">
  218. <td class="colFirst"><code>protected void</code></td>
  219. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#handleConcatenatedOptions-java.lang.String-">handleConcatenatedOptions</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;token)</code>
  220. <div class="block">Breaks <code>token</code> into its constituent parts
  221. using the following algorithm.</div>
  222. </td>
  223. </tr>
  224. <tr id="i1" class="rowColor">
  225. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a></code></td>
  226. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#parse-org.apache.commons.cli.Options-java.lang.String:A-">parse</a></span>(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options,
  227. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;arguments)</code>
  228. <div class="block">Parse the arguments according to the specified options.</div>
  229. </td>
  230. </tr>
  231. <tr id="i2" class="altColor">
  232. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a></code></td>
  233. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#parse-org.apache.commons.cli.Options-java.lang.String:A-boolean-">parse</a></span>(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options,
  234. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;arguments,
  235. boolean&nbsp;stopAtNonOption)</code>
  236. <div class="block">Parse the arguments according to the specified options.</div>
  237. </td>
  238. </tr>
  239. <tr id="i3" class="rowColor">
  240. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a></code></td>
  241. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#parse-org.apache.commons.cli.Options-java.lang.String:A-java.util.Properties-">parse</a></span>(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options,
  242. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;arguments,
  243. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;properties)</code>
  244. <div class="block">Parse the arguments according to the specified options and properties.</div>
  245. </td>
  246. </tr>
  247. <tr id="i4" class="altColor">
  248. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a></code></td>
  249. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/DefaultParser.html#parse-org.apache.commons.cli.Options-java.lang.String:A-java.util.Properties-boolean-">parse</a></span>(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options,
  250. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;arguments,
  251. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;properties,
  252. boolean&nbsp;stopAtNonOption)</code>
  253. <div class="block">Parse the arguments according to the specified options and properties.</div>
  254. </td>
  255. </tr>
  256. </table>
  257. <ul class="blockList">
  258. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  259. <!-- -->
  260. </a>
  261. <h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
  262. <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
  263. </ul>
  264. </li>
  265. </ul>
  266. </li>
  267. </ul>
  268. </div>
  269. <div class="details">
  270. <ul class="blockList">
  271. <li class="blockList">
  272. <!-- ============ FIELD DETAIL =========== -->
  273. <ul class="blockList">
  274. <li class="blockList"><a name="field.detail">
  275. <!-- -->
  276. </a>
  277. <h3>Field Detail</h3>
  278. <a name="cmd">
  279. <!-- -->
  280. </a>
  281. <ul class="blockList">
  282. <li class="blockList">
  283. <h4>cmd</h4>
  284. <pre>protected&nbsp;<a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a> cmd</pre>
  285. <div class="block">The command-line instance.</div>
  286. </li>
  287. </ul>
  288. <a name="options">
  289. <!-- -->
  290. </a>
  291. <ul class="blockList">
  292. <li class="blockList">
  293. <h4>options</h4>
  294. <pre>protected&nbsp;<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a> options</pre>
  295. <div class="block">The current options.</div>
  296. </li>
  297. </ul>
  298. <a name="stopAtNonOption">
  299. <!-- -->
  300. </a>
  301. <ul class="blockList">
  302. <li class="blockList">
  303. <h4>stopAtNonOption</h4>
  304. <pre>protected&nbsp;boolean stopAtNonOption</pre>
  305. <div class="block">Flag indicating how unrecognized tokens are handled. <tt>true</tt> to stop
  306. the parsing and add the remaining tokens to the args list.
  307. <tt>false</tt> to throw an exception.</div>
  308. </li>
  309. </ul>
  310. <a name="currentToken">
  311. <!-- -->
  312. </a>
  313. <ul class="blockList">
  314. <li class="blockList">
  315. <h4>currentToken</h4>
  316. <pre>protected&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> currentToken</pre>
  317. <div class="block">The token currently processed.</div>
  318. </li>
  319. </ul>
  320. <a name="currentOption">
  321. <!-- -->
  322. </a>
  323. <ul class="blockList">
  324. <li class="blockList">
  325. <h4>currentOption</h4>
  326. <pre>protected&nbsp;<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a> currentOption</pre>
  327. <div class="block">The last option parsed.</div>
  328. </li>
  329. </ul>
  330. <a name="skipParsing">
  331. <!-- -->
  332. </a>
  333. <ul class="blockList">
  334. <li class="blockList">
  335. <h4>skipParsing</h4>
  336. <pre>protected&nbsp;boolean skipParsing</pre>
  337. <div class="block">Flag indicating if tokens should no longer be analyzed and simply added as arguments of the command line.</div>
  338. </li>
  339. </ul>
  340. <a name="expectedOpts">
  341. <!-- -->
  342. </a>
  343. <ul class="blockListLast">
  344. <li class="blockList">
  345. <h4>expectedOpts</h4>
  346. <pre>protected&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a> expectedOpts</pre>
  347. <div class="block">The required options and groups expected to be found when parsing the command line.</div>
  348. </li>
  349. </ul>
  350. </li>
  351. </ul>
  352. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  353. <ul class="blockList">
  354. <li class="blockList"><a name="constructor.detail">
  355. <!-- -->
  356. </a>
  357. <h3>Constructor Detail</h3>
  358. <a name="DefaultParser--">
  359. <!-- -->
  360. </a>
  361. <ul class="blockListLast">
  362. <li class="blockList">
  363. <h4>DefaultParser</h4>
  364. <pre>public&nbsp;DefaultParser()</pre>
  365. </li>
  366. </ul>
  367. </li>
  368. </ul>
  369. <!-- ============ METHOD DETAIL ========== -->
  370. <ul class="blockList">
  371. <li class="blockList"><a name="method.detail">
  372. <!-- -->
  373. </a>
  374. <h3>Method Detail</h3>
  375. <a name="parse-org.apache.commons.cli.Options-java.lang.String:A-">
  376. <!-- -->
  377. </a>
  378. <ul class="blockList">
  379. <li class="blockList">
  380. <h4>parse</h4>
  381. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a>&nbsp;parse(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options,
  382. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;arguments)
  383. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  384. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/commons/cli/CommandLineParser.html#parse-org.apache.commons.cli.Options-java.lang.String:A-">CommandLineParser</a></code></span></div>
  385. <div class="block">Parse the arguments according to the specified options.</div>
  386. <dl>
  387. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  388. <dd><code><a href="../../../../org/apache/commons/cli/CommandLineParser.html#parse-org.apache.commons.cli.Options-java.lang.String:A-">parse</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/commons/cli/CommandLineParser.html" title="interface in org.apache.commons.cli">CommandLineParser</a></code></dd>
  389. <dt><span class="paramLabel">Parameters:</span></dt>
  390. <dd><code>options</code> - the specified Options</dd>
  391. <dd><code>arguments</code> - the command line arguments</dd>
  392. <dt><span class="returnLabel">Returns:</span></dt>
  393. <dd>the list of atomic option and value tokens</dd>
  394. <dt><span class="throwsLabel">Throws:</span></dt>
  395. <dd><code><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></code> - if there are any problems encountered
  396. while parsing the command line tokens.</dd>
  397. </dl>
  398. </li>
  399. </ul>
  400. <a name="parse-org.apache.commons.cli.Options-java.lang.String:A-java.util.Properties-">
  401. <!-- -->
  402. </a>
  403. <ul class="blockList">
  404. <li class="blockList">
  405. <h4>parse</h4>
  406. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a>&nbsp;parse(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options,
  407. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;arguments,
  408. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;properties)
  409. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  410. <div class="block">Parse the arguments according to the specified options and properties.</div>
  411. <dl>
  412. <dt><span class="paramLabel">Parameters:</span></dt>
  413. <dd><code>options</code> - the specified Options</dd>
  414. <dd><code>arguments</code> - the command line arguments</dd>
  415. <dd><code>properties</code> - command line option name-value pairs</dd>
  416. <dt><span class="returnLabel">Returns:</span></dt>
  417. <dd>the list of atomic option and value tokens</dd>
  418. <dt><span class="throwsLabel">Throws:</span></dt>
  419. <dd><code><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></code> - if there are any problems encountered
  420. while parsing the command line tokens.</dd>
  421. </dl>
  422. </li>
  423. </ul>
  424. <a name="parse-org.apache.commons.cli.Options-java.lang.String:A-boolean-">
  425. <!-- -->
  426. </a>
  427. <ul class="blockList">
  428. <li class="blockList">
  429. <h4>parse</h4>
  430. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a>&nbsp;parse(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options,
  431. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;arguments,
  432. boolean&nbsp;stopAtNonOption)
  433. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  434. <div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="../../../../org/apache/commons/cli/CommandLineParser.html#parse-org.apache.commons.cli.Options-java.lang.String:A-boolean-">CommandLineParser</a></code></span></div>
  435. <div class="block">Parse the arguments according to the specified options.</div>
  436. <dl>
  437. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  438. <dd><code><a href="../../../../org/apache/commons/cli/CommandLineParser.html#parse-org.apache.commons.cli.Options-java.lang.String:A-boolean-">parse</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/commons/cli/CommandLineParser.html" title="interface in org.apache.commons.cli">CommandLineParser</a></code></dd>
  439. <dt><span class="paramLabel">Parameters:</span></dt>
  440. <dd><code>options</code> - the specified Options</dd>
  441. <dd><code>arguments</code> - the command line arguments</dd>
  442. <dd><code>stopAtNonOption</code> - if <tt>true</tt> an unrecognized argument stops
  443. the parsing and the remaining arguments are added to the
  444. <a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli"><code>CommandLine</code></a>s args list. If <tt>false</tt> an unrecognized
  445. argument triggers a ParseException.</dd>
  446. <dt><span class="returnLabel">Returns:</span></dt>
  447. <dd>the list of atomic option and value tokens</dd>
  448. <dt><span class="throwsLabel">Throws:</span></dt>
  449. <dd><code><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></code> - if there are any problems encountered
  450. while parsing the command line tokens.</dd>
  451. </dl>
  452. </li>
  453. </ul>
  454. <a name="parse-org.apache.commons.cli.Options-java.lang.String:A-java.util.Properties-boolean-">
  455. <!-- -->
  456. </a>
  457. <ul class="blockList">
  458. <li class="blockList">
  459. <h4>parse</h4>
  460. <pre>public&nbsp;<a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a>&nbsp;parse(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options,
  461. <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[]&nbsp;arguments,
  462. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a>&nbsp;properties,
  463. boolean&nbsp;stopAtNonOption)
  464. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  465. <div class="block">Parse the arguments according to the specified options and properties.</div>
  466. <dl>
  467. <dt><span class="paramLabel">Parameters:</span></dt>
  468. <dd><code>options</code> - the specified Options</dd>
  469. <dd><code>arguments</code> - the command line arguments</dd>
  470. <dd><code>properties</code> - command line option name-value pairs</dd>
  471. <dd><code>stopAtNonOption</code> - if <tt>true</tt> an unrecognized argument stops
  472. the parsing and the remaining arguments are added to the
  473. <a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli"><code>CommandLine</code></a>s args list. If <tt>false</tt> an unrecognized
  474. argument triggers a ParseException.</dd>
  475. <dt><span class="returnLabel">Returns:</span></dt>
  476. <dd>the list of atomic option and value tokens</dd>
  477. <dt><span class="throwsLabel">Throws:</span></dt>
  478. <dd><code><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></code> - if there are any problems encountered
  479. while parsing the command line tokens.</dd>
  480. </dl>
  481. </li>
  482. </ul>
  483. <a name="handleConcatenatedOptions-java.lang.String-">
  484. <!-- -->
  485. </a>
  486. <ul class="blockListLast">
  487. <li class="blockList">
  488. <h4>handleConcatenatedOptions</h4>
  489. <pre>protected&nbsp;void&nbsp;handleConcatenatedOptions(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;token)
  490. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  491. <div class="block">Breaks <code>token</code> into its constituent parts
  492. using the following algorithm.
  493. <ul>
  494. <li>ignore the first character ("<b>-</b>")</li>
  495. <li>for each remaining character check if an <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a>
  496. exists with that id.</li>
  497. <li>if an <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> does exist then add that character
  498. prepended with "<b>-</b>" to the list of processed tokens.</li>
  499. <li>if the <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> can have an argument value and there
  500. are remaining characters in the token then add the remaining
  501. characters as a token to the list of processed tokens.</li>
  502. <li>if an <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> does <b>NOT</b> exist <b>AND</b>
  503. <code>stopAtNonOption</code> <b>IS</b> set then add the special token
  504. "<b>--</b>" followed by the remaining characters and also
  505. the remaining tokens directly to the processed tokens list.</li>
  506. <li>if an <a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli"><code>Option</code></a> does <b>NOT</b> exist <b>AND</b>
  507. <code>stopAtNonOption</code> <b>IS NOT</b> set then add that
  508. character prepended with "<b>-</b>".</li>
  509. </ul></div>
  510. <dl>
  511. <dt><span class="paramLabel">Parameters:</span></dt>
  512. <dd><code>token</code> - The current token to be <b>burst</b>
  513. at the first non-Option encountered.</dd>
  514. <dt><span class="throwsLabel">Throws:</span></dt>
  515. <dd><code><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></code> - if there are any problems encountered
  516. while parsing the command line token.</dd>
  517. </dl>
  518. </li>
  519. </ul>
  520. </li>
  521. </ul>
  522. </li>
  523. </ul>
  524. </div>
  525. </div>
  526. <!-- ========= END OF CLASS DATA ========= -->
  527. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  528. <div class="bottomNav"><a name="navbar.bottom">
  529. <!-- -->
  530. </a>
  531. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  532. <a name="navbar.bottom.firstrow">
  533. <!-- -->
  534. </a>
  535. <ul class="navList" title="Navigation">
  536. <li><a href="../../../../org/apache/commons/cli/package-summary.html">Package</a></li>
  537. <li class="navBarCell1Rev">Class</li>
  538. <li><a href="class-use/DefaultParser.html">Use</a></li>
  539. <li><a href="package-tree.html">Tree</a></li>
  540. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  541. <li><a href="../../../../index-all.html">Index</a></li>
  542. <li><a href="../../../../help-doc.html">Help</a></li>
  543. </ul>
  544. </div>
  545. <div class="subNav">
  546. <ul class="navList">
  547. <li><a href="../../../../org/apache/commons/cli/CommandLineParser.html" title="interface in org.apache.commons.cli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  548. <li><a href="../../../../org/apache/commons/cli/GnuParser.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  549. </ul>
  550. <ul class="navList">
  551. <li><a href="../../../../index.html?org/apache/commons/cli/DefaultParser.html" target="_top">Frames</a></li>
  552. <li><a href="DefaultParser.html" target="_top">No&nbsp;Frames</a></li>
  553. </ul>
  554. <ul class="navList" id="allclasses_navbar_bottom">
  555. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  556. </ul>
  557. <div>
  558. <script type="text/javascript"><!--
  559. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  560. if(window==top) {
  561. allClassesLink.style.display = "block";
  562. }
  563. else {
  564. allClassesLink.style.display = "none";
  565. }
  566. //-->
  567. </script>
  568. </div>
  569. <div>
  570. <ul class="subNavList">
  571. <li>Summary:&nbsp;</li>
  572. <li>Nested&nbsp;|&nbsp;</li>
  573. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  574. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  575. <li><a href="#method.summary">Method</a></li>
  576. </ul>
  577. <ul class="subNavList">
  578. <li>Detail:&nbsp;</li>
  579. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  580. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  581. <li><a href="#method.detail">Method</a></li>
  582. </ul>
  583. </div>
  584. <a name="skip.navbar.bottom">
  585. <!-- -->
  586. </a></div>
  587. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  588. <p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
  589. </body>
  590. </html>