You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you also require to have a usage statement printed
319
319
then calling <code>formatter.printHelp("ant", options, true)</code>
320
-
will generate a usage statment as well as the help information.
320
+
will generate a usage statement as well as the help information.
321
321
</p>
322
322
</subsection>
323
323
</section>
@@ -389,7 +389,7 @@ catch (ParseException exp) {
389
389
By in most cases the values on the command line are retrieved as Strings via the
390
390
<code>commandLine.getOptionValue(key)</code> command. However, it is possible for
391
391
the CLI library to convert the string into a different object. For example to specify
392
-
that the "count" option should reutrn an Integer the following code could be used:
392
+
that the "count" option should return an Integer the following code could be used:
393
393
</p>
394
394
<source>
395
395
public static void main(String[] args) {
@@ -398,7 +398,7 @@ catch (ParseException exp) {
398
398
.desc("the number of things")
399
399
.type(Integer.class)
400
400
.build();
401
-
Options options = new Options().addOption(cound);
401
+
Options options = new Options().addOption(count);
402
402
// create the parser
403
403
CommandLineParser parser = new DefaultParser();
404
404
try {
@@ -440,7 +440,7 @@ catch (ParseException exp) {
440
440
</ul>
441
441
Additional types may be added to the automatic parsing system by calling <code>TypeHandler.register(Class<T> clazz, Converter<T> converter)</code>.
442
442
The <code>Class<T></code> can be any defined class. The converter is a function that takes a <code>String</code> argument and returns an instance of
443
-
the class. Any expection thrown by the constructor will be caught and reported as a <code>ParseException</code>
443
+
the class. Any exception thrown by the constructor will be caught and reported as a <code>ParseException</code>
444
444
</p>
445
445
<p>
446
446
Conversions can be specified without using the <code>TypeHandler</code> class by specifying the converter
0 commit comments