CLIPParser(CLIPSubCommand[] aSubCommands, String aToolHelpMessage) Creates a CLIP parser instance with a set of sub commands.
public
CLIPParser(CLIPOption[] options, int minOperands, int maxOperands, String aCommandHelpMessage, String operandsHelp) Creates a CLIP parser instance with no sub commands.
getOptions(String[] args) Returns a Map with all the (key,value) for all the options.
The key is the option long name.
The value is always a String array, it's length is always one except if
it's a collection option, then the
length is the number of collection values in the option.
If the option is a boolean option (not option value or it a negated option
"--no-
Creates a CLIP parser instance with a set of sub commands.
Parameters: aSubCommands - array of sub commands for the CLIPParser. Parameters: aToolHelpMessage - message for the command. throws: IllegalArgumentException - if invalid information is passed.
Creates a CLIP parser instance with no sub commands.
Parameters: options - array with all the valid options for the sub command,or NULL if the sub command expects no options. Parameters: minOperands - minimum number of operands the sub command expects. Parameters: maxOperands - maximum number of operands the sub command expects. Parameters: aCommandHelpMessage - help message for the command. Parameters: operandsHelp - help message for the operands. throws: IllegalArgumentException - if invalid information is passed.
Returns the name part of a name/value pair element.
It uses '=' as the name/value separator.
Parameters: element - the option or operand name/value pair element. the name portion of the name/value pair or the completeelement if there is no value.
Returns a String array with all the operands of the argument array.
All the operands after the options end or after the operand demarcator "--".
Parameters: args - argument array to parse for operands. all the operands from the argument array, if the argument array has no operands it returns an empty array. throws: CLIPException - thrown if the operands can not be process because errors in the options or if the numberof operands in the argument array is outside of the minimum and maximum operand boundaries.
Returns a Map with all the (key,value) for all the options.
The key is the option long name.
The value is always a String array, it's length is always one except if
it's a collection option, then the
length is the number of collection values in the option.
If the option is a boolean option (not option value or it a negated option
"--no-
Returns the sub command from the argument array.
Parameters: args - argument array to parse for sub command. the entered sub command or NULL if no sub command was found. throws: CLIPException - thrown if the sub command is invalid.
Returns the value part of a name/value pair element.
It uses '=' as the name/value separator.
Parameters: element - the option or operand name/value pair element. the value portion of the name/value pair or nullif there is not value in the element.