Skip to content

Commit 7b52ba8

Browse files
committed
Javadoc.
1 parent ff7c287 commit 7b52ba8

1 file changed

Lines changed: 15 additions & 14 deletions

File tree

src/main/java/org/apache/commons/cli/DefaultParser.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2828
* @since 1.3
2929
*/
3030
public class DefaultParser implements CommandLineParser {
31+
3132
/** The command-line instance. */
3233
protected CommandLine cmd;
3334

@@ -123,7 +124,7 @@ private DefaultParser(final boolean allowPartialMatching,
123124
}
124125

125126
/**
126-
* Throw a {@link MissingArgumentException} if the current option didn't receive the number of arguments expected.
127+
* Throws a {@link MissingArgumentException} if the current option didn't receive the number of arguments expected.
127128
*/
128129
private void checkRequiredArgs() throws ParseException {
129130
if (currentOption != null && currentOption.requiresArg()) {
@@ -144,7 +145,7 @@ protected void checkRequiredOptions() throws MissingOptionException {
144145
}
145146

146147
/**
147-
* Search for a prefix that is the long name of an option (-Xmx512m)
148+
* Searches for a prefix that is the long name of an option (-Xmx512m)
148149
*
149150
* @param token
150151
*/
@@ -421,7 +422,7 @@ private void handleShortAndLongOption(final String token) throws ParseException
421422
}
422423

423424
/**
424-
* Handle any command line token.
425+
* Handles any command line token.
425426
*
426427
* @param token the command line token to handle
427428
* @throws ParseException
@@ -467,7 +468,7 @@ private void handleUnknownToken(final String token) throws ParseException {
467468
}
468469

469470
/**
470-
* Returns true is the token is a valid argument.
471+
* Tests if the token is a valid argument.
471472
*
472473
* @param token
473474
*/
@@ -476,7 +477,7 @@ private boolean isArgument(final String token) {
476477
}
477478

478479
/**
479-
* Check if the specified token is a Java-like property (-Dkey=value).
480+
* Tests if the specified token is a Java-like property (-Dkey=value).
480481
*/
481482
private boolean isJavaProperty(final String token) {
482483
final String opt = token.substring(0, 1);
@@ -486,7 +487,7 @@ private boolean isJavaProperty(final String token) {
486487
}
487488

488489
/**
489-
* Tells if the token looks like a long option.
490+
* Tests if the token looks like a long option.
490491
*
491492
* @param token
492493
*/
@@ -511,7 +512,7 @@ private boolean isLongOption(final String token) {
511512
}
512513

513514
/**
514-
* Check if the token is a negative number.
515+
* Tests if the token is a negative number.
515516
*
516517
* @param token
517518
*/
@@ -525,7 +526,7 @@ private boolean isNegativeNumber(final String token) {
525526
}
526527

527528
/**
528-
* Tells if the token looks like an option.
529+
* Tests if the token looks like an option.
529530
*
530531
* @param token
531532
*/
@@ -534,7 +535,7 @@ private boolean isOption(final String token) {
534535
}
535536

536537
/**
537-
* Tells if the token looks like a short option.
538+
* Tests if the token looks like a short option.
538539
*
539540
* @param token
540541
*/
@@ -565,7 +566,7 @@ public CommandLine parse(final Options options, final String[] arguments, final
565566
}
566567

567568
/**
568-
* Parse the arguments according to the specified options and properties.
569+
* Parses the arguments according to the specified options and properties.
569570
*
570571
* @param options the specified Options
571572
* @param arguments the command line arguments
@@ -579,7 +580,7 @@ public CommandLine parse(final Options options, final String[] arguments, final
579580
}
580581

581582
/**
582-
* Parse the arguments according to the specified options and properties.
583+
* Parses the arguments according to the specified options and properties.
583584
*
584585
* @param options the specified Options
585586
* @param arguments the command line arguments
@@ -646,7 +647,7 @@ private void updateRequiredOptions(final Option option) throws AlreadySelectedEx
646647
}
647648

648649
/**
649-
* Strip balanced leading and trailing quotes if the stripLeadingAndTrailingQuotes is set
650+
* Strips balanced leading and trailing quotes if the stripLeadingAndTrailingQuotes is set
650651
* If stripLeadingAndTrailingQuotes is null, then do not strip
651652
*
652653
* @param token a string
@@ -661,7 +662,7 @@ private String stripLeadingAndTrailingQuotesDefaultOff(final String token) {
661662
}
662663

663664
/**
664-
* Strip balanced leading and trailing quotes if the stripLeadingAndTrailingQuotes is set
665+
* Strips balanced leading and trailing quotes if the stripLeadingAndTrailingQuotes is set
665666
* If stripLeadingAndTrailingQuotes is null, then do not strip
666667
*
667668
* @param token a string
@@ -676,7 +677,7 @@ private String stripLeadingAndTrailingQuotesDefaultOn(final String token) {
676677
}
677678

678679
/**
679-
* Returns a {@link Builder} to create an {@link DefaultParser} using descriptive
680+
* Creates a new {@link Builder} to create an {@link DefaultParser} using descriptive
680681
* methods.
681682
*
682683
* @return a new {@link Builder} instance

0 commit comments

Comments
 (0)