net.sf.spring.batch.commandline
Class ArgumentParser

java.lang.Object
  extended bynet.sf.spring.batch.commandline.ArgumentParser

public class ArgumentParser
extends Object

Parse the command line.

Author:
willy

Field Summary
protected  Options options
           
 
Constructor Summary
ArgumentParser()
           
 
Method Summary
protected  Option buildOption(char shortOpt, String longOpt, boolean required, String description)
           
protected  Option buildOption(char shortOpt, String longOpt, boolean required, String description, int argCount, String argName)
           
 void displayHelp(String name)
           
 LauncherConfiguration parse(String[] args)
          Parses the command line arguments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

options

protected Options options
Constructor Detail

ArgumentParser

public ArgumentParser()
Method Detail

parse

public LauncherConfiguration parse(String[] args)
                            throws ParseException
Parses the command line arguments

Parameters:
args - the command line arguments
Returns:
The configuration.
Throws:
ParseException - when options aren't correct.

displayHelp

public void displayHelp(String name)

buildOption

protected Option buildOption(char shortOpt,
                             String longOpt,
                             boolean required,
                             String description)

buildOption

protected Option buildOption(char shortOpt,
                             String longOpt,
                             boolean required,
                             String description,
                             int argCount,
                             String argName)


Copyright © 2009. All Rights Reserved.