Package net.sf.statcvs.output
Class CommandLineParser
- java.lang.Object
-
- net.sf.statcvs.output.CommandLineParser
-
public class CommandLineParser extends java.lang.Object
Takes a command line, like given to theMain.main(java.lang.String[])
method, and turns it into aConfigurationOptions
object.- Version:
- $Id: CommandLineParser.java,v 1.29 2009/08/19 22:11:15 benoitx Exp $
- Author:
- Richard Cyganiak
-
-
Constructor Summary
Constructors Constructor Description CommandLineParser(java.lang.String[] args)
Constructor for CommandLineParser
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 inConfigurationOptions
).protected void
parseSwitch(java.lang.String switchName)
protected java.lang.String
popNextArg()
-
-
-
Method Detail
-
parse
public void parse() throws ConfigurationException
Parses the command line and sets the options (as static fields inConfigurationOptions
).- 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()
-
-