public class ApplicationCommandLineParser extends CommandLineParser
ApplicationConfig object returned by getConfig().| Modifier and Type | Field and Description |
|---|---|
protected de.esprit.appsuite.launch.ApplicationCommandLineParser.MyOptionApplicationName |
optApplicationName |
espritVersion, optDebug, optDemo, optHelp, optLocale, optLogDir, optLogToFile, optNoConsole, optTest, optVerbose, optVersion| Constructor and Description |
|---|
ApplicationCommandLineParser(java.lang.Class<?> mainClass,
java.lang.String... args) |
| Modifier and Type | Method and Description |
|---|---|
protected <F extends ApplicationConfig> |
createConfig()
May be overridden to return a specific
ApplicationConfig derivation which contains
all data extracted from the command line. |
java.lang.String |
getApplicationName() |
<F extends ApplicationConfig> |
getConfig()
Parses the command line and returns the
ApplicationConfig object as created by
createConfig(). |
boolean |
isPrintVersionOnly() |
void |
setDefaultApplicationName(java.lang.String applicationName) |
addOption, addOption, addSoftwareVersion, checkDependencies, createHelpText, createHelpText, createOptionList, createSyntaxLine, ensureParsed, fetchDefinedOptionFor, findDefinedOptionFor, getArgument, getArgumentCount, getArguments, getCustomVersion, getEspritVersion, getLogDir, getMainClass, getSoftwareVersions, getStartLogLevel, handleParsingError, hasArguments, isDebug, isDemoMode, isExitAfterParsing, isLogToFile, isNoConsoleLog, isParsed, isTestMode, isVerbose, parse, removeOption, removeOptionprotected final de.esprit.appsuite.launch.ApplicationCommandLineParser.MyOptionApplicationName optApplicationName
public ApplicationCommandLineParser(java.lang.Class<?> mainClass,
java.lang.String... args)
public final void setDefaultApplicationName(java.lang.String applicationName)
public final <F extends ApplicationConfig> F getConfig() throws java.lang.Exception
ApplicationConfig object as created by
createConfig(). If parsing fails the application exits and prints the command line
help message.java.lang.Exceptionprotected <F extends ApplicationConfig> F createConfig() throws java.lang.Exception
ApplicationConfig derivation which contains
all data extracted from the command line.java.lang.Exceptionpublic java.lang.String getApplicationName()
public boolean isPrintVersionOnly()
Copyright © 2014 EsprIT-Systems. All Rights Reserved.