| java.lang.Object org.jargp.ParameterDef org.jargp.BoolDef
BoolDef | public class BoolDef extends ParameterDef (Code) | | Command line flag definition. This defines a simple command line flag that
sets a boolean parameter value. Both true and false
settings are supported.
author: Dennis M. Sosnoski version: 1.0 |
Field Summary | |
protected boolean | m_value Value set when flag is seen. |
Constructor Summary | |
public | BoolDef(char chr, String name, String desc, boolean sense) Constructor with flag sense specified and description. | public | BoolDef(char chr, String name, boolean sense) Constructor with flag sense specified. | public | BoolDef(char chr, String name, String desc) Constructor defaulting to flag true with description. | public | BoolDef(char chr, String name) Constructor defaulting to flag true . |
m_value | protected boolean m_value(Code) | | Value set when flag is seen.
|
BoolDef | public BoolDef(char chr, String name, String desc, boolean sense)(Code) | | Constructor with flag sense specified and description.
Parameters: chr - parameter flag character Parameters: name - field name for parameter Parameters: desc - discription text for parameter (may be null ) Parameters: sense - value set when flag is seen |
BoolDef | public BoolDef(char chr, String name, boolean sense)(Code) | | Constructor with flag sense specified.
Parameters: chr - parameter flag character Parameters: name - field name for parameter Parameters: sense - value set when flag is seen |
BoolDef | public BoolDef(char chr, String name, String desc)(Code) | | Constructor defaulting to flag true with description.
Parameters: chr - parameter flag character Parameters: name - field name for parameter Parameters: desc - discription text for parameter |
BoolDef | public BoolDef(char chr, String name)(Code) | | Constructor defaulting to flag true .
Parameters: chr - parameter flag character Parameters: name - field name for parameter |
bindToClass | protected void bindToClass(Class clas)(Code) | | Bind parameter to target class field.
Parameters: clas - target class for saving parameter values throws: IllegalArgumentException - if the field is not a boolean |
handle | public void handle(ArgumentProcessor proc)(Code) | | Handle argument. This implementation of the abstract base class method
just sets the parameter value as appropriate for the flag.
Parameters: proc - argument processor making call to handler throws: IllegalArgumentException - on error in processing |
|
|