|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.uc4.ara.collabnet.JArgs.CmdLineParser.Option<T>
public abstract static class CmdLineParser.Option<T>
Representation of a command-line option
Nested Class Summary | |
---|---|
static class |
CmdLineParser.Option.BooleanOption
An option that expects a boolean value |
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 |
Constructor Summary | |
---|---|
protected |
CmdLineParser.Option(java.lang.String longForm,
boolean wantsValue,
boolean required)
|
Method Summary | |
---|---|
protected T |
getDefaultValue()
Override to define default value returned by getValue if option does not want a value |
T |
getValue(java.lang.String arg,
java.util.Locale locale)
|
boolean |
isRequired()
|
java.lang.String |
longForm()
|
protected T |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CmdLineParser.Option(java.lang.String longForm, boolean wantsValue, boolean required)
Method Detail |
---|
public boolean isRequired()
public java.lang.String shortForm()
public java.lang.String longForm()
public boolean wantsValue()
public final T getValue(java.lang.String arg, java.util.Locale locale) throws CmdLineParser.IllegalOptionValueException
CmdLineParser.IllegalOptionValueException
protected T parseValue(java.lang.String arg, java.util.Locale locale) throws CmdLineParser.IllegalOptionValueException
CmdLineParser.IllegalOptionValueException
protected T getDefaultValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |