Skip to content

Commit 024688c

Browse files
committed
Adds docs to CustomOption
Signed-off-by: Manoel Campos <manoelcampos@gmail.com>
1 parent c79b353 commit 024688c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/main/java/com/github/markusbernhardt/xmldoclet/CustomOption.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,23 @@
1111
* @author Manoel Campos
1212
*/
1313
public class CustomOption implements Doclet.Option {
14+
/**
15+
* The number of arguments this option will consume,
16+
* which is the number of expected {@link #parameters}.
17+
*/
1418
private final int argumentCount;
1519
private final String description;
1620
private final List<String> names;
21+
22+
/**
23+
* A user-friendly string description of the option's parameters, or the empty string if this option has no parameters.
24+
* This is used to generate the help message for the option.
25+
* If the option expectes a file name as parameter, the description may include the word "file"
26+
* to indicate that.
27+
*
28+
* <p>If the option has multiple parameters, this attribute should provide
29+
* a string representation of all of them, such as: file1 file2</p>
30+
*/
1731
private final String parameters;
1832

1933
/**
@@ -73,6 +87,13 @@ public String[] getParameterArray() {
7387
return parameters.split(" ");
7488
}
7589

90+
/**
91+
* {@inheritDoc}
92+
* It must check if the given option arguments are valid.
93+
* @param option {@inheritDoc}
94+
* @param arguments {@inheritDoc} received during the doclet execution
95+
* @return if the option has the expected number of arguments and they are valid
96+
*/
7697
@Override
7798
public boolean process(final String option, final List<String> arguments) {
7899
throw new UnsupportedOperationException("Not supported yet.");

0 commit comments

Comments
 (0)