|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.martiansoftware.jsap.CommandLineTokenizer
A utility class to parse a command line contained in a single String into
an array of argument tokens, much as the JVM (or more accurately, your
operating system) does before calling your programs' public static
void main(String[] args)
methods.
This class has been developed to parse the command line in the same way that MS Windows 2000 does. Arguments containing spaces should be enclosed in quotes. Quotes that should be in the argument string should be escaped with a preceding backslash ('\') character. Backslash characters that should be in the argument string should also be escaped with a preceding backslash character.
WheneverJSAP.parse(String)
is called, the specified String is
tokenized by this class, then forwarded to JSAP.parse(String[])
for further processing.
JSAP.parse(String)
,
JSAP.parse(String[])
Method Summary | |
static String[] |
tokenize(String commandLine)
Parses the specified command line into an array of individual arguments. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static String[] tokenize(String commandLine)
commandLine
- the command line to parse
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |