添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
protected void handleConcatenatedOptions ( String token)
Breaks token into its constituent parts using the following algorithm.
CommandLine parse ( Options options, String [] arguments)
Parse the arguments according to the specified options.
CommandLine parse ( Options options, String [] arguments, boolean stopAtNonOption)
Parse the arguments according to the specified options.
CommandLine parse ( Options options, String [] arguments, Properties properties)
Parse the arguments according to the specified options and properties.
CommandLine parse ( Options options, String [] arguments, Properties properties, boolean stopAtNonOption)
Parse the arguments according to the specified options and properties.

stopAtNonOption

protected boolean stopAtNonOption
Flag indicating how unrecognized tokens are handled. true to stop the parsing and add the remaining tokens to the args list. false to throw an exception.
String [] arguments) throws ParseException
Description copied from interface: CommandLineParser
Parse the arguments according to the specified options.
Specified by:
parse in interface CommandLineParser
Parameters:
options - the specified Options
arguments - the command line arguments
Returns:
the list of atomic option and value tokens
Throws:
ParseException - if there are any problems encountered while parsing the command line tokens.
public CommandLine parse(Options options,
                         String[] arguments,
                         Properties properties)
                  throws ParseException
Parse the arguments according to the specified options and properties.
Parameters:
options - the specified Options
arguments - the command line arguments
properties - command line option name-value pairs
Returns:
the list of atomic option and value tokens
Throws:
ParseException - if there are any problems encountered while parsing the command line tokens.
public CommandLine parse(Options options,
                         String[] arguments,
                         boolean stopAtNonOption)
                  throws ParseException
Description copied from interface: CommandLineParser
Parse the arguments according to the specified options.
Specified by:
parse in interface CommandLineParser
Parameters:
options - the specified Options
arguments - the command line arguments
stopAtNonOption - if true an unrecognized argument stops the parsing and the remaining arguments are added to the CommandLine s args list. If false an unrecognized argument triggers a ParseException.
Returns:
the list of atomic option and value tokens
Throws:
ParseException - if there are any problems encountered while parsing the command line tokens.
public CommandLine parse(Options options,
                         String[] arguments,
                         Properties properties,
                         boolean stopAtNonOption)
                  throws ParseException
Parse the arguments according to the specified options and properties.
Parameters:
options - the specified Options
arguments - the command line arguments
properties - command line option name-value pairs
stopAtNonOption - if true an unrecognized argument stops the parsing and the remaining arguments are added to the CommandLine s args list. If false an unrecognized argument triggers a ParseException.
Returns:
the list of atomic option and value tokens
Throws:
ParseException - if there are any problems encountered while parsing the command line tokens.

handleConcatenatedOptions

protected void handleConcatenatedOptions(String token)
                                  throws ParseException
Breaks token into its constituent parts using the following algorithm.
  • ignore the first character (" - ")
  • foreach remaining character check if an Option exists with that id.
  • if an Option does exist then add that character prepended with " - " to the list of processed tokens.
  • if the Option can have an argument value and there are remaining characters in the token then add the remaining characters as a token to the list of processed tokens.
  • if an Option does NOT exist AND stopAtNonOption IS set then add the special token " -- " followed by the remaining characters and also the remaining tokens directly to the processed tokens list.
  • if an Option does NOT exist AND stopAtNonOption IS NOT set then add that character prepended with " - ".
  • Parameters:
    token - The current token to be burst at the first non-Option encountered.
    Throws:
    ParseException - if there are any problems encountered while parsing the command line token.