org.jagatoo.commandline
Class CommandlineParser

java.lang.Object
  extended by org.jagatoo.commandline.CommandlineParser

public class CommandlineParser
extends java.lang.Object

Parses standard command lines.

These commandlines ca have the form: -a -xf 0 --long-option "option value" -long-option2 value2


Constructor Summary
CommandlineParser(ArgumentsRegistry argReg, ArgumentsHandler handler)
          Creates a new CommandlineParser.
 
Method Summary
 void parseCommandline(java.lang.String commandline)
          Parses a command line from a single String.
 void parseCommandline(java.lang.String[] chunks)
          Parses a command line from an array of chunks.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandlineParser

public CommandlineParser(ArgumentsRegistry argReg,
                         ArgumentsHandler handler)
Creates a new CommandlineParser.

Parameters:
argReg -
handler -
Method Detail

parseCommandline

public void parseCommandline(java.lang.String[] chunks)
                      throws CommandlineParsingException
Parses a command line from an array of chunks.

Parameters:
chunks - the chunks as passed to a main() method (a String split by white spaces, quoted Strings kept together omitting quotes)
Throws:
CommandlineParsingException

parseCommandline

public void parseCommandline(java.lang.String commandline)
                      throws CommandlineParsingException
Parses a command line from a single String.

Parameters:
commandline - the complete commandline as one String
Throws:
CommandlineParsingException