public abstract static class CmdLineParser.Option
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CmdLineParser.Option.BooleanOption |
static class |
CmdLineParser.Option.DoubleOption
An option that expects a floating-point value
|
static class |
CmdLineParser.Option.IntegerOption
An option that expects an integer value
|
static class |
CmdLineParser.Option.LongOption
An option that expects a long integer value
|
static class |
CmdLineParser.Option.StringOption
An option that expects a string value
|
Modifier | Constructor and Description |
---|---|
protected |
CmdLineParser.Option(char shortForm,
java.lang.String longForm,
boolean wantsValue) |
protected |
CmdLineParser.Option(java.lang.String longForm,
boolean wantsValue) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getValue(java.lang.String arg,
java.util.Locale locale) |
java.lang.String |
longForm() |
protected java.lang.Object |
parseValue(java.lang.String arg,
java.util.Locale locale)
Override to extract and convert an option value passed on the
command-line
|
java.lang.String |
shortForm() |
boolean |
wantsValue()
Tells whether or not this option wants a value
|
protected CmdLineParser.Option(java.lang.String longForm, boolean wantsValue)
protected CmdLineParser.Option(char shortForm, java.lang.String longForm, boolean wantsValue)
public java.lang.String shortForm()
public java.lang.String longForm()
public boolean wantsValue()
public final java.lang.Object getValue(java.lang.String arg, java.util.Locale locale) throws CmdLineParser.IllegalOptionValueException
protected java.lang.Object parseValue(java.lang.String arg, java.util.Locale locale) throws CmdLineParser.IllegalOptionValueException