| java.lang.Object org.jargp.ParameterDef org.jargp.StringListDef
All known Subclasses: org.jargp.NoFlagArgDef,
StringListDef | public class StringListDef extends ParameterDef (Code) | | Command line string list parameter definition. This defines a command line
flag with an associated string value which may be used repeatedly. The
argument giving the parameter value must be the next unused argument from the
command line following each occurrance of the flag, and must not begin with
the '-' character used to indicate control argument flags.
author: Dennis M. Sosnoski version: 1.0 |
StringListDef | public StringListDef(char chr, String name, String desc)(Code) | | Constructor with description.
Parameters: chr - parameter flag character Parameters: name - field name for parameter Parameters: desc - discription text for parameter |
StringListDef | public StringListDef(char chr, String name)(Code) | | Constructor without description.
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 List |
handle | public void handle(ArgumentProcessor proc)(Code) | | Handle argument. This implementation of the abstract base class method
makes sure that we have another command line argument available, and
checks that the argument does not begin with the '-' character used to
indicate control argument flags. If these conditions are met the
string value of the argument is added to the field list.
Parameters: proc - argument processor making call to handler throws: ArgumentErrorException - if argument value missing or malformed throws: IllegalArgumentException - on error in processing |
|
|