|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.unkrig.commons.text.CommandLineUtil
public final class CommandLineUtil
Utility methods for processing command line arguments.
| Method Summary | |
|---|---|
static java.lang.String[] |
expandSingleLetterOptions(java.lang.String[] args,
int idx,
java.lang.Object... mapping)
Replaces 'combined' single-letter options (as in "ls -lart") with 'long' options (as "ls -long
-all -reverse -time"). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String[] expandSingleLetterOptions(java.lang.String[] args,
int idx,
java.lang.Object... mapping)
"ls -lart") with 'long' options (as "ls -long
-all -reverse -time").
args - The command line arguments, e.g. "-foo", "-abc", "arg1", "arg2", "-bar"idx - The index of the command line argument to expand, e.g. 1 (designating "-abc")mapping - Triplets of Characters, Strings and Integers representing unexpanded
option, expanded option and option argument count, e.g. 'a', "-alpha", 1, 'b', "-beta", 0,
'c', "-gamma", 1
args, e.g. "-foo", "-alpha", "arg1", "-beta", "-gamma", "arg2",
"-bar"
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||