@CompileStatic @Deprecated class CommandArgumentParser extends Object
Constructor and description |
---|
CommandArgumentParser
() |
Type Params | Return Type | Name and description |
---|---|---|
|
static List<String> |
parseLine(String untrimmedLine, int numTokensToCollect) takes a String and tokenizes it according to posix-shell-like rules, meaning arguments are separated by non-escaped blanks or hyphens, and hyphens wrap tokens regardless of blanks, other hyphens or escaped hyphens within the wrapping hyphens. |
takes a String and tokenizes it according to posix-shell-like rules, meaning arguments are separated by non-escaped blanks or hyphens, and hyphens wrap tokens regardless of blanks, other hyphens or escaped hyphens within the wrapping hyphens. Example: "foo bar 123'456' 'abc\'def\\' ''" has 6 tokens: ["foo", "bar", "123", "456", "abc'def\", ""] @return
numTokensToCollect
- stop processing after so many tokens, negative means unlimitedCopyright © 2003-2024 The Apache Software Foundation. All rights reserved.