Package com.ibm.icu.dev.tool.shared
Class UOption
java.lang.Object
com.ibm.icu.dev.tool.shared.UOption
A command-line option. A UOption specifies the name of an option
and whether or not it takes an argument. It is a mutable object
that later contains the option argument, if any, and a boolean
flag stating whether the option was seen or not.
The static method parseArgs() takes an array of command-line
arguments and an array of UOptions and parses the command-line
arguments.
This deliberately resembles the icu4c file uoption.[ch].
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
int
static final int
static final int
static final int
char
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UOption
static UOption
static UOption
Create a UOption with the given attributes.static UOption
Create a UOption with the given attributes.static UOption
DESTDIR()
static UOption
ENCODING()
static UOption
HELP_H()
static UOption
static UOption
static UOption
static int
Java Command line argument parser.static int
Convenient method.static UOption
QUIET()
setDefault
(String s) Allows the default to be set in an option list.static UOption
private static void
syntaxError
(String message) Throw an exception indicating a syntax error.static UOption
VERBOSE()
static UOption
VERSION()
-
Field Details
-
longName
-
value
-
optionFn
-
context
-
shortName
public char shortName -
hasArg
public int hasArg -
doesOccur
public boolean doesOccur -
NO_ARG
public static final int NO_ARG- See Also:
-
REQUIRES_ARG
public static final int REQUIRES_ARG- See Also:
-
OPTIONAL_ARG
public static final int OPTIONAL_ARG- See Also:
-
-
Constructor Details
-
UOption
Constructor.
-
-
Method Details
-
create
Create a UOption with the given attributes. -
DEF
Create a UOption with the given attributes. Synonym for create(), for C compatibility. -
HELP_H
-
HELP_QUESTION_MARK
-
VERBOSE
-
QUIET
-
VERSION
-
COPYRIGHT
-
DESTDIR
-
SOURCEDIR
-
ENCODING
-
ICUDATADIR
-
PACKAGE_NAME
-
BUNDLE_NAME
-
setDefault
Allows the default to be set in an option list.- Parameters:
s
-- Returns:
- this
-
syntaxError
Throw an exception indicating a syntax error.
-