public class Options
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cmdOptions
All the options passed on the command line.
|
Constructor and Description |
---|
Options()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
static int |
optionLength(java.lang.String option)
Returns the "length" of a given option.
|
static void |
usage()
Display the arguments for JDiff.
|
static boolean |
validOptions(java.lang.String[][] options,
com.sun.javadoc.DocErrorReporter reporter)
After parsing the available options using
optionLength(java.lang.String) ,
Javadoc invokes this method with an array of options-arrays, where
the first item in any array is the option, and subsequent items in
that array are its arguments. |
public static java.lang.String cmdOptions
public static int optionLength(java.lang.String option)
validOptions(java.lang.String[][], com.sun.javadoc.DocErrorReporter)
to validate them.
Note:
The options arrive as case-sensitive strings. For options that are not case-sensitive, use toLowerCase() on the option string before comparing it.
option
- a String containing an optionpublic static boolean validOptions(java.lang.String[][] options, com.sun.javadoc.DocErrorReporter reporter)
optionLength(java.lang.String)
,
Javadoc invokes this method with an array of options-arrays, where
the first item in any array is the option, and subsequent items in
that array are its arguments. So, if -print is an option that takes
no arguments, and -copies is an option that takes 1 argument, then
-print -copies 3produces an array of arrays that looks like:
option[0][0] = -print option[1][0] = -copies option[1][1] = 3(By convention, command line switches start with a "-", but they don't have to.)
Note:
Javadoc passes allparameters to this method, not just
those that Javadoc doesn't recognize. The only way to
identify unexpected arguments is therefore to check for every
Javadoc parameter as well as doclet parameters.
options
- an array of String arrays, one per optionreporter
- a DocErrorReporter for generating error messagespublic static void usage()