com.continuent.tungsten.common.utils
Class CommandLineParser

java.lang.Object
  extended by com.continuent.tungsten.common.utils.CommandLineParser

public class CommandLineParser
extends java.lang.Object


Field Summary
static char ABSOLUTE_FLAG
           
static char BACKGROUND_FLAG
           
static char PARENTS_FLAG
           
 
Constructor Summary
CommandLineParser()
           
 
Method Summary
 java.util.Vector<Command> getCommand(jline.ConsoleReader cr, java.lang.String prompt, java.io.BufferedReader in)
           
 java.util.Vector<Command> getCommand(jline.ConsoleReader cr, java.lang.String prompt, java.io.BufferedReader in, boolean printPrompt)
           
static void main(java.lang.String[] args)
           
 java.util.Vector<Command> parse(java.lang.String commandLine)
           
 java.util.Vector<Command> parse(java.lang.String commandBuf, boolean parseFlags)
          This method parses a set of tokens returned by a simple command line parser, strips out any 'meta' commands and sets the appropriate flags, and returns the 'clean' set of tokens to be processed by the command processor.
 Command parseOne(java.lang.String commandLine)
           
 Command parseOne(java.lang.String commandLine, boolean parseFlags)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ABSOLUTE_FLAG

public static final char ABSOLUTE_FLAG
See Also:
Constant Field Values

PARENTS_FLAG

public static final char PARENTS_FLAG
See Also:
Constant Field Values

BACKGROUND_FLAG

public static final char BACKGROUND_FLAG
See Also:
Constant Field Values
Constructor Detail

CommandLineParser

public CommandLineParser()
Method Detail

main

public static void main(java.lang.String[] args)

parseOne

public Command parseOne(java.lang.String commandLine,
                        boolean parseFlags)

parseOne

public Command parseOne(java.lang.String commandLine)

parse

public java.util.Vector<Command> parse(java.lang.String commandLine)

parse

public java.util.Vector<Command> parse(java.lang.String commandBuf,
                                       boolean parseFlags)
This method parses a set of tokens returned by a simple command line parser, strips out any 'meta' commands and sets the appropriate flags, and returns the 'clean' set of tokens to be processed by the command processor.


getCommand

public java.util.Vector<Command> getCommand(jline.ConsoleReader cr,
                                            java.lang.String prompt,
                                            java.io.BufferedReader in)
                                     throws java.io.IOException
Throws:
java.io.IOException

getCommand

public java.util.Vector<Command> getCommand(jline.ConsoleReader cr,
                                            java.lang.String prompt,
                                            java.io.BufferedReader in,
                                            boolean printPrompt)
                                     throws java.io.IOException
Throws:
java.io.IOException