public class OverwriteApplicationConfig extends ApplicationConfig
ApplicationConfig.getConfig(Map)ApplicationConfig.Action, ApplicationConfig.CacheItem<T>, ApplicationConfig.OptionList| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
overwrite |
protected ApplicationConfig |
parent |
actions, ADJUSTING_PROPERTY, aliases, APP_NAME, cacheAction, cacheOption, classpath, CONFIG_ENCODING, CONFIG_FILE_NAME, CONFIG_PATH, context, curfile, defaults, env, etcfile, homefile, inParseOptionPhase, jvm, line, LIST_SEPARATOR, options, osName, pcs, unparsed, useOnlyAliases| Constructor and Description |
|---|
OverwriteApplicationConfig(ApplicationConfig parent,
Map<String,String> overwrite) |
| Modifier and Type | Method and Description |
|---|---|
String |
getOption(String key)
get option value as string.
|
ApplicationConfig |
getParent() |
boolean |
hasOption(String key)
Teste si un option existe ou non.
|
protected void |
init(Properties defaults,
String configFilename)
On separt l'init du corps du constructeur, car les sous classes ne doivent
pas l'executer.
|
ApplicationConfig |
parse(String... args)
Parse option and call set necessary method, read jvm, env variable,
Load configuration file and prepare Action.
|
addAction, addActionAlias, addAlias, addPropertyChangeListener, addPropertyChangeListener, cleanUserConfig, convertOption, createAction, doAction, doAllAction, firePropertyChange, getActionStep, getConfig, getConfigFileName, getConfigFileNameOption, getConfigPath, getEncoding, getEncodingOption, getFlatOptions, getFlatOptions, getMethods, getObject, getObject, getOption, getOption, getOptionAsBoolean, getOptionAsClass, getOptionAsColor, getOptionAsDate, getOptionAsDouble, getOptionAsFile, getOptionAsFloat, getOptionAsInt, getOptionAsKeyStroke, getOptionAsList, getOptionAsLocale, getOptionAsLong, getOptionAsObject, getOptionAsObject, getOptionAsProperties, getOptionAsSingleton, getOptionAsSingleton, getOptionAsTime, getOptionAsTimestamp, getOptionAsURL, getOptionAsVersion, getOptions, getOptionStartsWith, getOsArch, getOsName, getParams, getPrintableConfig, getPropertyChangeListeners, getPropertyChangeListeners, getSubConfig, getSystemConfigFile, getSystemConfigurationPath, getUnparsed, getUserConfigDirectory, getUserConfigFile, getUserHome, getUsername, hasListeners, hasOption, installSaveUserAction, isAdjusting, isUseOnlyAliases, loadActions, loadActions, loadDefaultOptions, loadDefaultOptions, loadResource, migrateUserConfigurationFile, printConfig, printConfig, putObject, putObject, removePropertyChangeListener, removePropertyChangeListener, replaceRecursiveOptions, save, saveForSystem, saveForUser, saveResource, setAdjusting, setAppName, setConfigFileName, setDefaultOption, setEncoding, setOption, setOptions, setUseOnlyAliasesprotected ApplicationConfig parent
public OverwriteApplicationConfig(ApplicationConfig parent, Map<String,String> overwrite)
protected void init(Properties defaults, String configFilename)
ApplicationConfiginit in class ApplicationConfigdefaults - properties that override default value of optionClass, can be nullconfigFilename - override default config filename, can be nullpublic ApplicationConfig getParent()
public String getOption(String key)
ApplicationConfiggetOption in class ApplicationConfigkey - the option's keypublic boolean hasOption(String key)
ApplicationConfighasOption in class ApplicationConfigkey - la clef de l'option à testertrue si l'option existe, false sinon.public ApplicationConfig parse(String... args) throws ArgumentsParserException
ApplicationConfigparse in class ApplicationConfigargs - argument as main(String[] args)ArgumentsParserException - if parsing failedCopyright © 2013–2014 CodeLutin. All rights reserved.