|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jargp.ParameterDef | +--org.jargp.BoolDef
Command line flag definition. This defines a simple command line flag that
sets a boolean parameter value. Both true
and false
settings are supported.
Field Summary | |
protected boolean |
m_value
Value set when flag is seen. |
Fields inherited from class org.jargp.ParameterDef |
m_char, m_description, m_field, m_name |
Constructor Summary | |
BoolDef(char chr,
java.lang.String name)
Constructor defaulting to flag true . |
|
BoolDef(char chr,
java.lang.String name,
boolean sense)
Constructor with flag sense specified. |
|
BoolDef(char chr,
java.lang.String name,
java.lang.String desc)
Constructor defaulting to flag true with description. |
|
BoolDef(char chr,
java.lang.String name,
java.lang.String desc,
boolean sense)
Constructor with flag sense specified and description. |
Method Summary | |
protected void |
bindToClass(java.lang.Class clas)
Bind parameter to target class field. |
void |
handle(ArgumentProcessor proc)
Handle argument. |
Methods inherited from class org.jargp.ParameterDef |
getAbbreviation, getDescription, getFlag |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean m_value
Constructor Detail |
public BoolDef(char chr, java.lang.String name, java.lang.String desc, boolean sense)
chr
- parameter flag charactername
- field name for parameterdesc
- discription text for parameter (may be null
)sense
- value set when flag is seenpublic BoolDef(char chr, java.lang.String name, boolean sense)
chr
- parameter flag charactername
- field name for parametersense
- value set when flag is seenpublic BoolDef(char chr, java.lang.String name, java.lang.String desc)
true
with description.
chr
- parameter flag charactername
- field name for parameterdesc
- discription text for parameterpublic BoolDef(char chr, java.lang.String name)
true
.
chr
- parameter flag charactername
- field name for parameterMethod Detail |
protected void bindToClass(java.lang.Class clas)
bindToClass
in class ParameterDef
clas
- target class for saving parameter values
java.lang.IllegalArgumentException
- if the field is not a booleanpublic void handle(ArgumentProcessor proc)
handle
in class ParameterDef
proc
- argument processor making call to handler
java.lang.IllegalArgumentException
- on error in processing
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |