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.
 
 
 
 

674 lines
40 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>Parser (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="Parser (Apache Commons CLI 1.4 API)";
  16. }
  17. }
  18. catch(err) {
  19. }
  20. //-->
  21. var methods = {"i0":42,"i1":38,"i2":42,"i3":42,"i4":42,"i5":42,"i6":42,"i7":42,"i8":42,"i9":42,"i10":42,"i11":42};
  22. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated 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/Parser.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/ParseException.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  52. <li><a href="../../../../org/apache/commons/cli/PatternOptionBuilder.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/Parser.html" target="_top">Frames</a></li>
  56. <li><a href="Parser.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 Parser" class="title">Class Parser</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.Parser</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. <dl>
  114. <dt>Direct Known Subclasses:</dt>
  115. <dd><a href="../../../../org/apache/commons/cli/BasicParser.html" title="class in org.apache.commons.cli">BasicParser</a>, <a href="../../../../org/apache/commons/cli/GnuParser.html" title="class in org.apache.commons.cli">GnuParser</a>, <a href="../../../../org/apache/commons/cli/PosixParser.html" title="class in org.apache.commons.cli">PosixParser</a></dd>
  116. </dl>
  117. <hr>
  118. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  119. <div class="block"><span class="deprecationComment">since 1.3, the two-pass parsing with the flatten method is not enough flexible to handle complex cases</span></div>
  120. </div>
  121. <br>
  122. <pre><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
  123. public abstract class <span class="typeNameLabel">Parser</span>
  124. 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>
  125. implements <a href="../../../../org/apache/commons/cli/CommandLineParser.html" title="interface in org.apache.commons.cli">CommandLineParser</a></pre>
  126. <div class="block"><code>Parser</code> creates <a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli"><code>CommandLine</code></a>s.</div>
  127. <dl>
  128. <dt><span class="simpleTagLabel">Version:</span></dt>
  129. <dd>$Id: Parser.java 1744812 2016-05-20 23:36:20Z ggregory $</dd>
  130. </dl>
  131. </li>
  132. </ul>
  133. </div>
  134. <div class="summary">
  135. <ul class="blockList">
  136. <li class="blockList">
  137. <!-- =========== FIELD SUMMARY =========== -->
  138. <ul class="blockList">
  139. <li class="blockList"><a name="field.summary">
  140. <!-- -->
  141. </a>
  142. <h3>Field Summary</h3>
  143. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
  144. <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  145. <tr>
  146. <th class="colFirst" scope="col">Modifier and Type</th>
  147. <th class="colLast" scope="col">Field and Description</th>
  148. </tr>
  149. <tr class="altColor">
  150. <td class="colFirst"><code>protected <a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a></code></td>
  151. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.html#cmd">cmd</a></span></code>
  152. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  153. <div class="block">commandline instance</div>
  154. </td>
  155. </tr>
  156. </table>
  157. </li>
  158. </ul>
  159. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  160. <ul class="blockList">
  161. <li class="blockList"><a name="constructor.summary">
  162. <!-- -->
  163. </a>
  164. <h3>Constructor Summary</h3>
  165. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
  166. <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
  167. <tr>
  168. <th class="colOne" scope="col">Constructor and Description</th>
  169. </tr>
  170. <tr class="altColor">
  171. <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.html#Parser--">Parser</a></span>()</code>
  172. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  173. &nbsp;</td>
  174. </tr>
  175. </table>
  176. </li>
  177. </ul>
  178. <!-- ========== METHOD SUMMARY =========== -->
  179. <ul class="blockList">
  180. <li class="blockList"><a name="method.summary">
  181. <!-- -->
  182. </a>
  183. <h3>Method Summary</h3>
  184. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  185. <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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  186. <tr>
  187. <th class="colFirst" scope="col">Modifier and Type</th>
  188. <th class="colLast" scope="col">Method and Description</th>
  189. </tr>
  190. <tr id="i0" class="altColor">
  191. <td class="colFirst"><code>protected void</code></td>
  192. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.html#checkRequiredOptions--">checkRequiredOptions</a></span>()</code>
  193. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  194. <div class="block">Throws a <a href="../../../../org/apache/commons/cli/MissingOptionException.html" title="class in org.apache.commons.cli"><code>MissingOptionException</code></a> if all of the required options
  195. are not present.</div>
  196. </td>
  197. </tr>
  198. <tr id="i1" class="rowColor">
  199. <td class="colFirst"><code>protected abstract <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>
  200. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.html#flatten-org.apache.commons.cli.Options-java.lang.String:A-boolean-">flatten</a></span>(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;opts,
  201. <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,
  202. boolean&nbsp;stopAtNonOption)</code>
  203. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  204. <div class="block">Subclasses must implement this method to reduce
  205. the <code>arguments</code> that have been passed to the parse method.</div>
  206. </td>
  207. </tr>
  208. <tr id="i2" class="altColor">
  209. <td class="colFirst"><code>protected <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a></code></td>
  210. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.html#getOptions--">getOptions</a></span>()</code>
  211. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  212. &nbsp;</td>
  213. </tr>
  214. <tr id="i3" class="rowColor">
  215. <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>
  216. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.html#getRequiredOptions--">getRequiredOptions</a></span>()</code>
  217. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  218. &nbsp;</td>
  219. </tr>
  220. <tr id="i4" class="altColor">
  221. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a></code></td>
  222. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.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,
  223. <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>
  224. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  225. <div class="block">Parses the specified <code>arguments</code> based
  226. on the specified <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>.</div>
  227. </td>
  228. </tr>
  229. <tr id="i5" class="rowColor">
  230. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a></code></td>
  231. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.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,
  232. <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,
  233. boolean&nbsp;stopAtNonOption)</code>
  234. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  235. <div class="block">Parses the specified <code>arguments</code>
  236. based on the specified <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>.</div>
  237. </td>
  238. </tr>
  239. <tr id="i6" class="altColor">
  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/Parser.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"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  245. <div class="block">Parse the arguments according to the specified options and properties.</div>
  246. </td>
  247. </tr>
  248. <tr id="i7" class="rowColor">
  249. <td class="colFirst"><code><a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a></code></td>
  250. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.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,
  251. <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,
  252. <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,
  253. boolean&nbsp;stopAtNonOption)</code>
  254. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  255. <div class="block">Parse the arguments according to the specified options and
  256. properties.</div>
  257. </td>
  258. </tr>
  259. <tr id="i8" class="altColor">
  260. <td class="colFirst"><code>void</code></td>
  261. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.html#processArgs-org.apache.commons.cli.Option-java.util.ListIterator-">processArgs</a></span>(<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&nbsp;opt,
  262. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</a>&lt;<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>&gt;&nbsp;iter)</code>
  263. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  264. <div class="block">Process the argument values for the specified Option
  265. <code>opt</code> using the values retrieved from the
  266. specified iterator <code>iter</code>.</div>
  267. </td>
  268. </tr>
  269. <tr id="i9" class="rowColor">
  270. <td class="colFirst"><code>protected void</code></td>
  271. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.html#processOption-java.lang.String-java.util.ListIterator-">processOption</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;arg,
  272. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</a>&lt;<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>&gt;&nbsp;iter)</code>
  273. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  274. <div class="block">Process the Option specified by <code>arg</code> using the values
  275. retrieved from the specified iterator <code>iter</code>.</div>
  276. </td>
  277. </tr>
  278. <tr id="i10" class="altColor">
  279. <td class="colFirst"><code>protected void</code></td>
  280. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.html#processProperties-java.util.Properties-">processProperties</a></span>(<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>
  281. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  282. <div class="block">Sets the values of Options using the values in <code>properties</code>.</div>
  283. </td>
  284. </tr>
  285. <tr id="i11" class="rowColor">
  286. <td class="colFirst"><code>protected void</code></td>
  287. <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/commons/cli/Parser.html#setOptions-org.apache.commons.cli.Options-">setOptions</a></span>(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options)</code>
  288. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  289. &nbsp;</td>
  290. </tr>
  291. </table>
  292. <ul class="blockList">
  293. <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
  294. <!-- -->
  295. </a>
  296. <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>
  297. <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>
  298. </ul>
  299. </li>
  300. </ul>
  301. </li>
  302. </ul>
  303. </div>
  304. <div class="details">
  305. <ul class="blockList">
  306. <li class="blockList">
  307. <!-- ============ FIELD DETAIL =========== -->
  308. <ul class="blockList">
  309. <li class="blockList"><a name="field.detail">
  310. <!-- -->
  311. </a>
  312. <h3>Field Detail</h3>
  313. <a name="cmd">
  314. <!-- -->
  315. </a>
  316. <ul class="blockListLast">
  317. <li class="blockList">
  318. <h4>cmd</h4>
  319. <pre>protected&nbsp;<a href="../../../../org/apache/commons/cli/CommandLine.html" title="class in org.apache.commons.cli">CommandLine</a> cmd</pre>
  320. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  321. <div class="block">commandline instance</div>
  322. </li>
  323. </ul>
  324. </li>
  325. </ul>
  326. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  327. <ul class="blockList">
  328. <li class="blockList"><a name="constructor.detail">
  329. <!-- -->
  330. </a>
  331. <h3>Constructor Detail</h3>
  332. <a name="Parser--">
  333. <!-- -->
  334. </a>
  335. <ul class="blockListLast">
  336. <li class="blockList">
  337. <h4>Parser</h4>
  338. <pre>public&nbsp;Parser()</pre>
  339. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  340. </li>
  341. </ul>
  342. </li>
  343. </ul>
  344. <!-- ============ METHOD DETAIL ========== -->
  345. <ul class="blockList">
  346. <li class="blockList"><a name="method.detail">
  347. <!-- -->
  348. </a>
  349. <h3>Method Detail</h3>
  350. <a name="setOptions-org.apache.commons.cli.Options-">
  351. <!-- -->
  352. </a>
  353. <ul class="blockList">
  354. <li class="blockList">
  355. <h4>setOptions</h4>
  356. <pre>protected&nbsp;void&nbsp;setOptions(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;options)</pre>
  357. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  358. </li>
  359. </ul>
  360. <a name="getOptions--">
  361. <!-- -->
  362. </a>
  363. <ul class="blockList">
  364. <li class="blockList">
  365. <h4>getOptions</h4>
  366. <pre>protected&nbsp;<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;getOptions()</pre>
  367. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  368. </li>
  369. </ul>
  370. <a name="getRequiredOptions--">
  371. <!-- -->
  372. </a>
  373. <ul class="blockList">
  374. <li class="blockList">
  375. <h4>getRequiredOptions</h4>
  376. <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>&nbsp;getRequiredOptions()</pre>
  377. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  378. </li>
  379. </ul>
  380. <a name="flatten-org.apache.commons.cli.Options-java.lang.String:A-boolean-">
  381. <!-- -->
  382. </a>
  383. <ul class="blockList">
  384. <li class="blockList">
  385. <h4>flatten</h4>
  386. <pre>protected abstract&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>[]&nbsp;flatten(<a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli">Options</a>&nbsp;opts,
  387. <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,
  388. boolean&nbsp;stopAtNonOption)
  389. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  390. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  391. <div class="block">Subclasses must implement this method to reduce
  392. the <code>arguments</code> that have been passed to the parse method.</div>
  393. <dl>
  394. <dt><span class="paramLabel">Parameters:</span></dt>
  395. <dd><code>opts</code> - The Options to parse the arguments by.</dd>
  396. <dd><code>arguments</code> - The arguments that have to be flattened.</dd>
  397. <dd><code>stopAtNonOption</code> - specifies whether to stop
  398. flattening when a non option has been encountered</dd>
  399. <dt><span class="returnLabel">Returns:</span></dt>
  400. <dd>a String array of the flattened arguments</dd>
  401. <dt><span class="throwsLabel">Throws:</span></dt>
  402. <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
  403. while parsing the command line tokens.</dd>
  404. </dl>
  405. </li>
  406. </ul>
  407. <a name="parse-org.apache.commons.cli.Options-java.lang.String:A-">
  408. <!-- -->
  409. </a>
  410. <ul class="blockList">
  411. <li class="blockList">
  412. <h4>parse</h4>
  413. <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,
  414. <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)
  415. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  416. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  417. <div class="block">Parses the specified <code>arguments</code> based
  418. on the specified <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>.</div>
  419. <dl>
  420. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  421. <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>
  422. <dt><span class="paramLabel">Parameters:</span></dt>
  423. <dd><code>options</code> - the <code>Options</code></dd>
  424. <dd><code>arguments</code> - the <code>arguments</code></dd>
  425. <dt><span class="returnLabel">Returns:</span></dt>
  426. <dd>the <code>CommandLine</code></dd>
  427. <dt><span class="throwsLabel">Throws:</span></dt>
  428. <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
  429. while parsing the command line tokens.</dd>
  430. </dl>
  431. </li>
  432. </ul>
  433. <a name="parse-org.apache.commons.cli.Options-java.lang.String:A-java.util.Properties-">
  434. <!-- -->
  435. </a>
  436. <ul class="blockList">
  437. <li class="blockList">
  438. <h4>parse</h4>
  439. <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,
  440. <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,
  441. <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)
  442. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  443. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  444. <div class="block">Parse the arguments according to the specified options and properties.</div>
  445. <dl>
  446. <dt><span class="paramLabel">Parameters:</span></dt>
  447. <dd><code>options</code> - the specified Options</dd>
  448. <dd><code>arguments</code> - the command line arguments</dd>
  449. <dd><code>properties</code> - command line option name-value pairs</dd>
  450. <dt><span class="returnLabel">Returns:</span></dt>
  451. <dd>the list of atomic option and value tokens</dd>
  452. <dt><span class="throwsLabel">Throws:</span></dt>
  453. <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
  454. while parsing the command line tokens.</dd>
  455. <dt><span class="simpleTagLabel">Since:</span></dt>
  456. <dd>1.1</dd>
  457. </dl>
  458. </li>
  459. </ul>
  460. <a name="parse-org.apache.commons.cli.Options-java.lang.String:A-boolean-">
  461. <!-- -->
  462. </a>
  463. <ul class="blockList">
  464. <li class="blockList">
  465. <h4>parse</h4>
  466. <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,
  467. <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,
  468. boolean&nbsp;stopAtNonOption)
  469. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  470. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  471. <div class="block">Parses the specified <code>arguments</code>
  472. based on the specified <a href="../../../../org/apache/commons/cli/Options.html" title="class in org.apache.commons.cli"><code>Options</code></a>.</div>
  473. <dl>
  474. <dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
  475. <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>
  476. <dt><span class="paramLabel">Parameters:</span></dt>
  477. <dd><code>options</code> - the <code>Options</code></dd>
  478. <dd><code>arguments</code> - the <code>arguments</code></dd>
  479. <dd><code>stopAtNonOption</code> - if <tt>true</tt> an unrecognized argument stops
  480. the parsing and the remaining arguments are added to the
  481. <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
  482. argument triggers a ParseException.</dd>
  483. <dt><span class="returnLabel">Returns:</span></dt>
  484. <dd>the <code>CommandLine</code></dd>
  485. <dt><span class="throwsLabel">Throws:</span></dt>
  486. <dd><code><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></code> - if an error occurs when parsing the arguments.</dd>
  487. </dl>
  488. </li>
  489. </ul>
  490. <a name="parse-org.apache.commons.cli.Options-java.lang.String:A-java.util.Properties-boolean-">
  491. <!-- -->
  492. </a>
  493. <ul class="blockList">
  494. <li class="blockList">
  495. <h4>parse</h4>
  496. <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,
  497. <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,
  498. <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,
  499. boolean&nbsp;stopAtNonOption)
  500. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  501. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  502. <div class="block">Parse the arguments according to the specified options and
  503. properties.</div>
  504. <dl>
  505. <dt><span class="paramLabel">Parameters:</span></dt>
  506. <dd><code>options</code> - the specified Options</dd>
  507. <dd><code>arguments</code> - the command line arguments</dd>
  508. <dd><code>properties</code> - command line option name-value pairs</dd>
  509. <dd><code>stopAtNonOption</code> - if <tt>true</tt> an unrecognized argument stops
  510. the parsing and the remaining arguments are added to the
  511. <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
  512. argument triggers a ParseException.</dd>
  513. <dt><span class="returnLabel">Returns:</span></dt>
  514. <dd>the list of atomic option and value tokens</dd>
  515. <dt><span class="throwsLabel">Throws:</span></dt>
  516. <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
  517. while parsing the command line tokens.</dd>
  518. <dt><span class="simpleTagLabel">Since:</span></dt>
  519. <dd>1.1</dd>
  520. </dl>
  521. </li>
  522. </ul>
  523. <a name="processProperties-java.util.Properties-">
  524. <!-- -->
  525. </a>
  526. <ul class="blockList">
  527. <li class="blockList">
  528. <h4>processProperties</h4>
  529. <pre>protected&nbsp;void&nbsp;processProperties(<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)
  530. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  531. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  532. <div class="block">Sets the values of Options using the values in <code>properties</code>.</div>
  533. <dl>
  534. <dt><span class="paramLabel">Parameters:</span></dt>
  535. <dd><code>properties</code> - The value properties to be processed.</dd>
  536. <dt><span class="throwsLabel">Throws:</span></dt>
  537. <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
  538. while processing the properties.</dd>
  539. </dl>
  540. </li>
  541. </ul>
  542. <a name="checkRequiredOptions--">
  543. <!-- -->
  544. </a>
  545. <ul class="blockList">
  546. <li class="blockList">
  547. <h4>checkRequiredOptions</h4>
  548. <pre>protected&nbsp;void&nbsp;checkRequiredOptions()
  549. throws <a href="../../../../org/apache/commons/cli/MissingOptionException.html" title="class in org.apache.commons.cli">MissingOptionException</a></pre>
  550. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  551. <div class="block">Throws a <a href="../../../../org/apache/commons/cli/MissingOptionException.html" title="class in org.apache.commons.cli"><code>MissingOptionException</code></a> if all of the required options
  552. are not present.</div>
  553. <dl>
  554. <dt><span class="throwsLabel">Throws:</span></dt>
  555. <dd><code><a href="../../../../org/apache/commons/cli/MissingOptionException.html" title="class in org.apache.commons.cli">MissingOptionException</a></code> - if any of the required Options are not present.</dd>
  556. </dl>
  557. </li>
  558. </ul>
  559. <a name="processArgs-org.apache.commons.cli.Option-java.util.ListIterator-">
  560. <!-- -->
  561. </a>
  562. <ul class="blockList">
  563. <li class="blockList">
  564. <h4>processArgs</h4>
  565. <pre>public&nbsp;void&nbsp;processArgs(<a href="../../../../org/apache/commons/cli/Option.html" title="class in org.apache.commons.cli">Option</a>&nbsp;opt,
  566. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</a>&lt;<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>&gt;&nbsp;iter)
  567. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  568. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  569. <div class="block">Process the argument values for the specified Option
  570. <code>opt</code> using the values retrieved from the
  571. specified iterator <code>iter</code>.</div>
  572. <dl>
  573. <dt><span class="paramLabel">Parameters:</span></dt>
  574. <dd><code>opt</code> - The current Option</dd>
  575. <dd><code>iter</code> - The iterator over the flattened command line Options.</dd>
  576. <dt><span class="throwsLabel">Throws:</span></dt>
  577. <dd><code><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></code> - if an argument value is required
  578. and it is has not been found.</dd>
  579. </dl>
  580. </li>
  581. </ul>
  582. <a name="processOption-java.lang.String-java.util.ListIterator-">
  583. <!-- -->
  584. </a>
  585. <ul class="blockListLast">
  586. <li class="blockList">
  587. <h4>processOption</h4>
  588. <pre>protected&nbsp;void&nbsp;processOption(<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;arg,
  589. <a href="http://docs.oracle.com/javase/7/docs/api/java/util/ListIterator.html?is-external=true" title="class or interface in java.util">ListIterator</a>&lt;<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>&gt;&nbsp;iter)
  590. throws <a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></pre>
  591. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;</div>
  592. <div class="block">Process the Option specified by <code>arg</code> using the values
  593. retrieved from the specified iterator <code>iter</code>.</div>
  594. <dl>
  595. <dt><span class="paramLabel">Parameters:</span></dt>
  596. <dd><code>arg</code> - The String value representing an Option</dd>
  597. <dd><code>iter</code> - The iterator over the flattened command line arguments.</dd>
  598. <dt><span class="throwsLabel">Throws:</span></dt>
  599. <dd><code><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli">ParseException</a></code> - if <code>arg</code> does not represent an Option</dd>
  600. </dl>
  601. </li>
  602. </ul>
  603. </li>
  604. </ul>
  605. </li>
  606. </ul>
  607. </div>
  608. </div>
  609. <!-- ========= END OF CLASS DATA ========= -->
  610. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  611. <div class="bottomNav"><a name="navbar.bottom">
  612. <!-- -->
  613. </a>
  614. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  615. <a name="navbar.bottom.firstrow">
  616. <!-- -->
  617. </a>
  618. <ul class="navList" title="Navigation">
  619. <li><a href="../../../../org/apache/commons/cli/package-summary.html">Package</a></li>
  620. <li class="navBarCell1Rev">Class</li>
  621. <li><a href="class-use/Parser.html">Use</a></li>
  622. <li><a href="package-tree.html">Tree</a></li>
  623. <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  624. <li><a href="../../../../index-all.html">Index</a></li>
  625. <li><a href="../../../../help-doc.html">Help</a></li>
  626. </ul>
  627. </div>
  628. <div class="subNav">
  629. <ul class="navList">
  630. <li><a href="../../../../org/apache/commons/cli/ParseException.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
  631. <li><a href="../../../../org/apache/commons/cli/PatternOptionBuilder.html" title="class in org.apache.commons.cli"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  632. </ul>
  633. <ul class="navList">
  634. <li><a href="../../../../index.html?org/apache/commons/cli/Parser.html" target="_top">Frames</a></li>
  635. <li><a href="Parser.html" target="_top">No&nbsp;Frames</a></li>
  636. </ul>
  637. <ul class="navList" id="allclasses_navbar_bottom">
  638. <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  639. </ul>
  640. <div>
  641. <script type="text/javascript"><!--
  642. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  643. if(window==top) {
  644. allClassesLink.style.display = "block";
  645. }
  646. else {
  647. allClassesLink.style.display = "none";
  648. }
  649. //-->
  650. </script>
  651. </div>
  652. <div>
  653. <ul class="subNavList">
  654. <li>Summary:&nbsp;</li>
  655. <li>Nested&nbsp;|&nbsp;</li>
  656. <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  657. <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
  658. <li><a href="#method.summary">Method</a></li>
  659. </ul>
  660. <ul class="subNavList">
  661. <li>Detail:&nbsp;</li>
  662. <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  663. <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
  664. <li><a href="#method.detail">Method</a></li>
  665. </ul>
  666. </div>
  667. <a name="skip.navbar.bottom">
  668. <!-- -->
  669. </a></div>
  670. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  671. <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>
  672. </body>
  673. </html>