cli
Class AbstractCmdLine

java.lang.Object
  extended by cli.AbstractCmdLine
Direct Known Subclasses:
AbstractBenchmarkCmd, HsqldbServerCmd

public abstract class AbstractCmdLine
extends Object

The abstract class helps to define java command line.

Since:
20 oct. 2009 version 2.1.1
Version:
2.1.1
Author:
Arnaud Malapert

Field Summary
 List<String> arguments
          receives other command line parameters than options
static String CMD
           
protected  boolean hasExtraArgument
           
static Logger LOGGER
           
static int NONE
           
protected  org.kohsuke.args4j.CmdLineParser parser
           
 
Constructor Summary
AbstractCmdLine(boolean hasExtraArguments)
          the mode of this Command Line
 
Method Summary
protected abstract  void checkData()
          check the validity of the command line
 void doMain(String[] args)
          parse the command line
protected abstract  void execute()
           
 void exitOnException(Exception e)
           
 void help()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CMD

public static final String CMD
See Also:
Constant Field Values

LOGGER

public static final Logger LOGGER

NONE

public static final int NONE
See Also:
Constant Field Values

arguments

public List<String> arguments
receives other command line parameters than options


hasExtraArgument

protected final boolean hasExtraArgument

parser

protected final org.kohsuke.args4j.CmdLineParser parser
Constructor Detail

AbstractCmdLine

public AbstractCmdLine(boolean hasExtraArguments)
the mode of this Command Line

Parameters:
hasExtraArguments -
Method Detail

checkData

protected abstract void checkData()
                           throws org.kohsuke.args4j.CmdLineException
check the validity of the command line

Throws:
org.kohsuke.args4j.CmdLineException

execute

protected abstract void execute()

help

public void help()

exitOnException

public final void exitOnException(Exception e)

doMain

public void doMain(String[] args)
parse the command line

Parameters:
args - CL arguments


Copyright © 2012. All Rights Reserved.