Skip to content

Commit 1009059

Browse files
committed
Make doclint happy
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/cli/trunk@1677406 13f79535-47bb-0310-9956-ffa450edef68
1 parent e38288b commit 1009059

6 files changed

Lines changed: 27 additions & 17 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,8 @@ private void updateRequiredOptions(Option option) throws AlreadySelectedExceptio
664664
*
665665
* @param token The current token to be <b>burst</b>
666666
* at the first non-Option encountered.
667+
* @throws ParseException if there are any problems encountered
668+
* while parsing the command line token.
667669
*/
668670
protected void handleConcatenatedOptions(String token) throws ParseException
669671
{

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@
5858
* This produces the following output:
5959
*
6060
* <pre>
61-
* usage: myapp -f <FILE> [-h] [-v]
61+
* usage: myapp -f &lt;FILE&gt; [-h] [-v]
6262
* Do something useful with an input file
6363
*
64-
* -f,--file &lt;FILE> The file to be processed
64+
* -f,--file &lt;FILE&gt; The file to be processed
6565
* -h,--help
6666
* -v,--version Print the version of the application
6767
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ public int hashCode()
666666
*
667667
* @return a clone of this Option instance
668668
* @throws RuntimeException if a {@link CloneNotSupportedException} has been thrown
669-
* by {@link super#clone()}
669+
* by {@code super.clone()}
670670
*/
671671
@Override
672672
public Object clone()

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ protected List getRequiredOptions()
6767
* @param stopAtNonOption specifies whether to stop
6868
* flattening when a non option has been encountered
6969
* @return a String array of the flattened arguments
70+
* @throws ParseException if there are any problems encountered
71+
* while parsing the command line tokens.
7072
*/
7173
protected abstract String[] flatten(Options opts, String[] arguments, boolean stopAtNonOption)
7274
throws ParseException;
@@ -78,8 +80,8 @@ protected abstract String[] flatten(Options opts, String[] arguments, boolean st
7880
* @param options the <code>Options</code>
7981
* @param arguments the <code>arguments</code>
8082
* @return the <code>CommandLine</code>
81-
* @throws ParseException if an error occurs when parsing the
82-
* arguments.
83+
* @throws ParseException if there are any problems encountered
84+
* while parsing the command line tokens.
8385
*/
8486
public CommandLine parse(Options options, String[] arguments) throws ParseException
8587
{
@@ -246,6 +248,8 @@ else if (t.startsWith("-"))
246248
* Sets the values of Options using the values in <code>properties</code>.
247249
*
248250
* @param properties The value properties to be processed.
251+
* @throws ParseException if there are any problems encountered
252+
* while processing the properties.
249253
*/
250254
protected void processProperties(Properties properties) throws ParseException
251255
{

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,34 @@
2323
import java.util.Date;
2424

2525
/**
26-
* Allows Options to be created from a single String.
26+
* <p>Allows Options to be created from a single String.
2727
* The pattern contains various single character flags and via
2828
* an optional punctuation character, their expected type.
29-
* <p>
29+
* </p>
30+
*
3031
* <table border="1">
31-
* <tr><td>a</td><td>-a flag</td></tr>
32-
* <tr><td>b@</td><td>-b [classname]</td></tr>
33-
* <tr><td>c&gt;</td><td>-c [filename]</td></tr>
34-
* <tr><td>d+</td><td>-d [classname] (creates object via empty constructor)</td></tr>
35-
* <tr><td>e%</td><td>-e [number] (creates Double/Long instance depending on existing of a '.')</td></tr>
36-
* <tr><td>f/</td><td>-f [url]</td></tr>
37-
* <tr><td>g:</td><td>-g [string]</td></tr>
32+
* <caption>Overview of PatternOptionBuilder patterns</caption>
33+
* <tr><td>a</td><td>-a flag</td></tr>
34+
* <tr><td>b@</td><td>-b [classname]</td></tr>
35+
* <tr><td>c&gt;</td><td>-c [filename]</td></tr>
36+
* <tr><td>d+</td><td>-d [classname] (creates object via empty constructor)</td></tr>
37+
* <tr><td>e%</td><td>-e [number] (creates Double/Long instance depending on existing of a '.')</td></tr>
38+
* <tr><td>f/</td><td>-f [url]</td></tr>
39+
* <tr><td>g:</td><td>-g [string]</td></tr>
3840
* </table>
41+
*
3942
* <p>
4043
* For example, the following allows command line flags of '-v -p string-value -f /dir/file'.
4144
* The exclamation mark precede a mandatory option.
45+
* </p>
4246
*
4347
* <pre>
4448
* Options options = PatternOptionBuilder.parsePattern("vp:!f/");
4549
* </pre>
4650
*
4751
* <p>
48-
* TODO These need to break out to OptionType and also to be pluggable.
52+
* TODO: These need to break out to OptionType and also to be pluggable.
53+
* </p>
4954
*
5055
* @version $Id$
5156
*/

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private void init()
5959
* <p>An implementation of {@link Parser}'s abstract
6060
* {@link Parser#flatten(Options,String[],boolean) flatten} method.</p>
6161
*
62-
* <p>The following are the rules used by this flatten method.
62+
* <p>The following are the rules used by this flatten method.</p>
6363
* <ol>
6464
* <li>if <code>stopAtNonOption</code> is <b>true</b> then do not
6565
* burst anymore of <code>arguments</code> entries, just add each
@@ -85,7 +85,6 @@ private void init()
8585
* by any of the previous rules, then the entry is added to the list
8686
* of processed tokens.</li>
8787
* </ol>
88-
* </p>
8988
*
9089
* @param options The command line {@link Options}
9190
* @param arguments The command line arguments to be parsed

0 commit comments

Comments
 (0)