# Class CommandLineParser

java.lang.Object
net.sf.statcvs.output.CommandLineParser

public class CommandLineParser extends Object
Takes a command line, like given to the `Main.main(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 invalid input: '<'rcyg@gmx.de>

## Constructor Summary

Constructors
Constructor
Description
`CommandLineParser(String[] args)`
Constructor for CommandLineParser

## Method Summary

Modifier and Type
Method
Description
`protected void`
`checkForRequiredArgs()`
`protected boolean`
`doChildrenSwitch(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(String switchName)`
`protected String`
`popNextArg()`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CommandLineParser

public CommandLineParser(String[] args)
Constructor for CommandLineParser

Parameters:
  `args` - the command line parameters

## Method Details

### 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 String popNextArg()

### parseSwitch

protected void parseSwitch(String switchName) throws ConfigurationException

Throws:
  `ConfigurationException`

### doChildrenSwitch

protected boolean doChildrenSwitch(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()