Skip to content

Commit

Permalink
Javadoc: Use semantic tag <strong> instead of style tag <b>
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Nov 15, 2024
1 parent 5ab9462 commit fec5017
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/apache/commons/cli/BasicParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class BasicParser extends Parser {
* </p>
*
* <p>
* <b>Note:</b> {@code options} and {@code stopAtNonOption} are not used in this {@code flatten} method.
* <strong>Note:</strong> {@code options} and {@code stopAtNonOption} are not used in this {@code flatten} method.
* </p>
*
* @param options The command line {@link Options}
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/org/apache/commons/cli/DefaultParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -336,20 +336,20 @@ private List<String> getMatchingLongOptions(final String token) {
* Breaks {@code token} into its constituent parts using the following algorithm.
*
* <ul>
* <li>ignore the first character ("<b>-</b>")</li>
* <li>ignore the first character ("<strong>-</strong>")</li>
* <li>for each remaining character check if an {@link Option} exists with that id.</li>
* <li>if an {@link Option} does exist then add that character prepended with "<b>-</b>" to the list of processed
* <li>if an {@link Option} does exist then add that character prepended with "<strong>-</strong>" to the list of processed
* tokens.</li>
* <li>if the {@link Option} can have an argument value and there are remaining characters in the token then add the
* remaining characters as a token to the list of processed tokens.</li>
* <li>if an {@link Option} does <b>NOT</b> exist <b>AND</b> {@code stopAtNonOption} <b>IS</b> set then add the
* special token "<b>--</b>" followed by the remaining characters and also the remaining tokens directly to the
* <li>if an {@link Option} does <strong>NOT</strong> exist <strong>AND</strong> {@code stopAtNonOption} <strong>IS</strong> set then add the
* special token "<strong>--</strong>" followed by the remaining characters and also the remaining tokens directly to the
* processed tokens list.</li>
* <li>if an {@link Option} does <b>NOT</b> exist <b>AND</b> {@code stopAtNonOption} <b>IS NOT</b> set then add
* that character prepended with "<b>-</b>".</li>
* <li>if an {@link Option} does <strong>NOT</strong> exist <strong>AND</strong> {@code stopAtNonOption} <strong>IS NOT</strong> set then add
* that character prepended with "<strong>-</strong>".</li>
* </ul>
*
* @param token The current token to be <b>burst</b> at the first non-Option encountered.
* @param token The current token to be <strong>burst</strong> at the first non-Option encountered.
* @throws ParseException if there are any problems encountered while parsing the command line token.
*/
protected void handleConcatenatedOptions(final String token) throws ParseException {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/commons/cli/GnuParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class GnuParser extends Parser {
/**
* This flatten method does so using the following rules:
* <ol>
* <li>If an {@link Option} exists for the first character of the {@code arguments} entry <b>AND</b> an
* <li>If an {@link Option} exists for the first character of the {@code arguments} entry <strong>AND</strong> an
* {@link Option} does not exist for the whole {@code argument} then add the first character as an option to the
* processed tokens list e.g. "-D" and add the rest of the entry to the also.</li>
* <li>Otherwise just add the token to the processed tokens list.</li>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/apache/commons/cli/Option.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
* An Option is not created independently, but is created through an instance of {@link Options}. An Option is required to have at least a short or a long-name.
* </p>
* <p>
* <b>Note:</b> once an {@link Option} has been added to an instance of {@link Options}, its required flag cannot be changed.
* <strong>Note:</strong> once an {@link Option} has been added to an instance of {@link Options}, its required flag cannot be changed.
* </p>
*
* @see org.apache.commons.cli.Options
Expand Down Expand Up @@ -317,7 +317,7 @@ public Builder valueSeparator() {
/**
* The Option will use {@code sep} as a means to separate argument values.
* <p>
* <b>Example:</b>
* <strong>Example:</strong>
* </p>
*
* <pre>
Expand Down Expand Up @@ -955,7 +955,7 @@ public void setType(final Class<?> type) {
/**
* Sets the type of this Option.
* <p>
* <b>Note:</b> this method is kept for binary compatibility and the input type is supposed to be a {@link Class} object.
* <strong>Note:</strong> this method is kept for binary compatibility and the input type is supposed to be a {@link Class} object.
* </p>
*
* @param type the type of this Option.
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/apache/commons/cli/OptionBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public static OptionBuilder withType(final Class<?> newType) {
/**
* The next Option created will have a value that will be an instance of {@code type}.
* <p>
* <b>Note:</b> this method is kept for binary compatibility and the input type is supposed to be a {@link Class}
* <strong>Note:</strong> this method is kept for binary compatibility and the input type is supposed to be a {@link Class}
* object.
*
* @param newType the type of the Options argument value
Expand All @@ -294,7 +294,7 @@ public static OptionBuilder withType(final Object newType) {
/**
* The next Option created uses '{@code =}' as a means to separate argument values.
*
* <b>Example:</b>
* <strong>Example:</strong>
*
* <pre>
* Option opt = withValueSeparator().create('D');
Expand All @@ -314,7 +314,7 @@ public static OptionBuilder withValueSeparator() {
/**
* The next Option created uses {@code sep} as a means to separate argument values.
* <p>
* <b>Example:</b>
* <strong>Example:</strong>
*
* <pre>
* Option opt = OptionBuilder.withValueSeparator('=').create('D');
Expand Down
26 changes: 13 additions & 13 deletions src/main/java/org/apache/commons/cli/PosixParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ public class PosixParser extends Parser {
* Breaks {@code token} into its constituent parts using the following algorithm.
*
* <ul>
* <li>ignore the first character ("<b>-</b>")</li>
* <li>ignore the first character ("<strong>-</strong>")</li>
* <li>for each remaining character check if an {@link Option} exists with that id.</li>
* <li>if an {@link Option} does exist then add that character prepended with "<b>-</b>" to the list of processed
* <li>if an {@link Option} does exist then add that character prepended with "<strong>-</strong>" to the list of processed
* tokens.</li>
* <li>if the {@link Option} can have an argument value and there are remaining characters in the token then add the
* remaining characters as a token to the list of processed tokens.</li>
* <li>if an {@link Option} does <b>NOT</b> exist <b>AND</b> {@code stopAtNonOption} <b>IS</b> set then add the
* special token "<b>--</b>" followed by the remaining characters and also the remaining tokens directly to the
* <li>if an {@link Option} does <strong>NOT</strong> exist <strong>AND</strong> {@code stopAtNonOption} <strong>IS</strong> set then add the
* special token "<strong>--</strong>" followed by the remaining characters and also the remaining tokens directly to the
* processed tokens list.</li>
* <li>if an {@link Option} does <b>NOT</b> exist <b>AND</b> {@code stopAtNonOption} <b>IS NOT</b> set then add
* that character prepended with "<b>-</b>".</li>
* <li>if an {@link Option} does <strong>NOT</strong> exist <strong>AND</strong> {@code stopAtNonOption} <strong>IS NOT</strong> set then add
* that character prepended with "<strong>-</strong>".</li>
* </ul>
*
* @param token The current token to be <b>burst</b>
* @param token The current token to be <strong>burst</strong>
* @param stopAtNonOption Specifies whether to stop processing at the first non-Option encountered.
*/
protected void burstToken(final String token, final boolean stopAtNonOption) {
Expand Down Expand Up @@ -94,17 +94,17 @@ protected void burstToken(final String token, final boolean stopAtNonOption) {
* The following are the rules used by this flatten method.
* </p>
* <ol>
* <li>if {@code stopAtNonOption} is <b>true</b> then do not burst anymore of {@code arguments} entries, just
* <li>if {@code stopAtNonOption} is <strong>true</strong> then do not burst anymore of {@code arguments} entries, just
* add each successive entry without further processing. Otherwise, ignore {@code stopAtNonOption}.</li>
* <li>if the current {@code arguments} entry is "<b>--</b>" just add the entry to the list of processed
* <li>if the current {@code arguments} entry is "<strong>--</strong>" just add the entry to the list of processed
* tokens</li>
* <li>if the current {@code arguments} entry is "<b>-</b>" just add the entry to the list of processed tokens</li>
* <li>if the current {@code arguments} entry is two characters in length and the first character is "<b>-</b>"
* <li>if the current {@code arguments} entry is "<strong>-</strong>" just add the entry to the list of processed tokens</li>
* <li>if the current {@code arguments} entry is two characters in length and the first character is "<strong>-</strong>"
* then check if this is a valid {@link Option} id. If it is a valid id, then add the entry to the list of processed
* tokens and set the current {@link Option} member. If it is not a valid id and {@code stopAtNonOption} is true,
* then the remaining entries are copied to the list of processed tokens. Otherwise, the current entry is ignored.</li>
* <li>if the current {@code arguments} entry is more than two characters in length and the first character is
* "<b>-</b>" then we need to burst the entry to determine its constituents. For more information on the bursting
* "<strong>-</strong>" then we need to burst the entry to determine its constituents. For more information on the bursting
* algorithm see {@link PosixParser#burstToken(String, boolean) burstToken}.</li>
* <li>if the current {@code arguments} entry is not handled by any of the previous rules, then the entry is added
* to the list of processed tokens.</li>
Expand Down Expand Up @@ -195,7 +195,7 @@ private void init() {
}

/**
* Add the special token "<b>--</b>" and the current {@code value} to the processed tokens list. Then add all the
* Add the special token "<strong>--</strong>" and the current {@code value} to the processed tokens list. Then add all the
* remaining {@code argument} values to the processed tokens list.
*
* @param value The current token
Expand Down

0 comments on commit fec5017

Please sign in to comment.