public class CmdLine extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
LOGGER |
static boolean |
testMode |
static String |
VERSION |
| Constructor and Description |
|---|
CmdLine() |
| Modifier and Type | Method and Description |
|---|---|
String |
dash(int number)
get the given number of dashes
|
void |
doCommand()
handle the command line command
|
void |
error(String msg)
print the given error and set the exit Code
|
void |
handle(Throwable t)
handle the given Throwable
|
static void |
main(String[] args)
main routine
|
int |
maininstance(String[] args)
main routine
|
String |
s(char c,
int number)
get a string with number repetitions of the given char
|
void |
show(String format,
Object... values)
show the given values in the given format
|
void |
showHelp()
show Help
|
void |
showVersion()
show the Version
|
void |
usage(String msg)
display usage
|
protected void |
work()
work on the given commands
|
protected static Logger LOGGER
public static final String VERSION
public static boolean testMode
public void handle(Throwable t)
t - the Throwable to handlepublic void showVersion()
public void usage(String msg)
msg - - a message to be displayed (if any)public void error(String msg)
msg - public void showHelp()
public void doCommand()
throws Throwable
Throwablepublic void show(String format, Object... values)
format - values - public String dash(int number)
number - public String s(char c, int number)
c - number - protected void work()
throws Throwable
public int maininstance(String[] args)
args - - the command line argumentspublic static void main(String[] args)
args - - command line argumentsCopyright © 2018 BITPlan GmbH. All rights reserved.