net.sf.statcvs.output
Class CommandLineParser

java.lang.Object
  extended bynet.sf.statcvs.output.CommandLineParser

public class CommandLineParser
extends java.lang.Object

Takes a command line, like given to the Main.main(java.lang.String[]) method, and turns it into a ConfigurationOptions object.

Version:
$Id: CommandLineParser.java,v 1.29 2009/08/19 22:11:15 benoitx Exp $
Author:
Richard Cyganiak

Constructor Summary
CommandLineParser(java.lang.String[] args)
          Constructor for CommandLineParser
 
Method Summary
protected  void checkForRequiredArgs()
           
protected  boolean doChildrenSwitch(java.lang.String s)
          Give the argument to children classes that may have a way to recognise it.
protected  int getArgCount()
           
protected  boolean isArgsEmpty()
           
 void parse()
          Parses the command line and sets the options (as static fields in ConfigurationOptions).
protected  void parseSwitch(java.lang.String switchName)
           
protected  java.lang.String popNextArg()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandLineParser

public CommandLineParser(java.lang.String[] args)
Constructor for CommandLineParser

Parameters:
args - the command line parameters
Method Detail

parse

public void parse()
           throws ConfigurationException
Parses the command line and sets the options (as static fields in ConfigurationOptions).

Throws:
ConfigurationException - if errors are present on the command line

popNextArg

protected java.lang.String popNextArg()

parseSwitch

protected void parseSwitch(java.lang.String switchName)
                    throws ConfigurationException
Throws:
ConfigurationException

doChildrenSwitch

protected boolean doChildrenSwitch(java.lang.String s)
                            throws ConfigurationException
Give the argument to children classes that may have a way to recognise it.

Parameters:
s -
Returns:
Throws:
ConfigurationException

checkForRequiredArgs

protected void checkForRequiredArgs()
                             throws ConfigurationException
Throws:
ConfigurationException

getArgCount

protected int getArgCount()

isArgsEmpty

protected boolean isArgsEmpty()


Copyright © 2002-2010 Appendium - Portfolio Financing Platform. All Rights Reserved.