@CliMode(id="version", title="version", usage="Print the version of this program.") public abstract class AbstractVersionedMain extends AbstractMain
main-program
that has a version.Modifier and Type | Field and Description |
---|---|
private static String |
SNAPSHOT
|
private boolean |
version
The option to print the version.
|
EXIT_CODE_CONSTRAINT_VIOLATION, EXIT_CODE_ILLEGAL_SYNTAX, EXIT_CODE_OK, EXIT_CODE_UNEXPECTED
Constructor and Description |
---|
AbstractVersionedMain() |
Modifier and Type | Method and Description |
---|---|
protected String |
getVersion()
This method gets the Version of this program.
|
protected int |
run(CliModeObject mode)
This method is called after the options are parsed and injected.
|
protected abstract int |
runDefaultMode()
|
getIocContainer, getOutputSettings, getParserBuilder, getStandardError, getStandardOutput, getStreamUtil, handleError, printHelp, run, runAndExit, setStandardError, setStandardOutput, validate
getLogger
private static final String SNAPSHOT
protected String getVersion()
protected int run(CliModeObject mode) throws Exception
AbstractMain
run
in class AbstractMain
mode
- is the mode
of the invocation.AbstractMain.EXIT_CODE_OK
on success.Exception
- in case of an unexpected error.protected abstract int runDefaultMode() throws Exception
AbstractMain.EXIT_CODE_OK
on success.Exception
- in case of an unexpected error.Copyright © 2001–2016 mmm-Team. All rights reserved.