public abstract class BaseAppConfig extends AbstractConfiguration implements CommonCliConstants
Context.Builder
Modifier and Type | Field and Description |
---|---|
protected Context |
defaultValue
定义命令行参数的默认值
|
protected static java.util.logging.Logger |
logger |
protected org.apache.commons.cli.Options |
options
定义命令行参数
|
CONTROL_OPTIONS, DEFINE_OPTION, DEFINE_OPTION_DESC, HELP_OPTION, HELP_OPTION_DESC, HELP_OPTION_LONG
Modifier | Constructor and Description |
---|---|
protected |
BaseAppConfig() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getAppName() |
protected java.lang.String |
getCmdLineSyntax() |
protected java.util.Map<java.lang.String,java.lang.Object> |
getDefaultValueMap()
子类提供命令行参数的默认值
|
protected java.lang.String |
getFooter() |
protected java.lang.String |
getHeader() |
org.apache.commons.cli.Options |
getOptions() |
BaseAppConfig |
parseCommandLine(java.lang.String[] args)
解析命令行参数
|
loadConfig
builder, getContext, getProperty, hasProperty, setProperties, setProperty
protected static final java.util.logging.Logger logger
protected final org.apache.commons.cli.Options options
protected final Context defaultValue
protected BaseAppConfig()
protected java.util.Map<java.lang.String,java.lang.Object> getDefaultValueMap()
AbstractConfiguration
getDefaultValueMap
in class AbstractConfiguration
public BaseAppConfig parseCommandLine(java.lang.String[] args)
args
- protected java.lang.String getCmdLineSyntax()
public org.apache.commons.cli.Options getOptions()
protected java.lang.String getAppName()
protected java.lang.String getHeader()
HelpFormatter.printHelp(String, String, Options, String)
protected java.lang.String getFooter()
HelpFormatter.printHelp(String, String, Options, String)
Copyright © 2019. All rights reserved.