本文整理了Java中org.apache.commons.cli.Option.setDescription()
方法的一些代码示例,展示了Option.setDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Option.setDescription()
方法的具体详情如下:
包路径:org.apache.commons.cli.Option
类名称:Option
方法名:setDescription
[英]Sets the self-documenting description of this Option
[中]设置此选项的自记录说明
代码示例来源:origin: net.sf.gluebooster.java.booster/gb-essentials
public void setOptionDescription(Option optionDescription) {
this.optionDescription = optionDescription;
// synchronize the descriptions if any is null.
String optionDescriptionString = optionDescription.getDescription();
if (description == null)
description = optionDescriptionString;
if (optionDescriptionString == null)
optionDescription.setDescription(description);
}
代码示例来源:origin: deegree/deegree3
private static Options initOptions() {
Options opts = new Options();
RasterOptionsParser.addRasterIOLineOptions( opts );
Option opt = new Option( "o", OPT_OUTPUT_DIR, true, "output directory" );
opt.setRequired( true );
opts.addOption( opt );
opt = new Option( "ol", OPT_OUTPUT_LEVELS, true,
"number of resolution levels in the generated multiresolution model." );
opts.addOption( opt );
opt = new Option( "or", OPT_OUTPUT_ROWS, true, "number of rows per macrotriangle" );
opt.setDescription( "32|64|128" );
opts.addOption( opt );
opt = new Option( "mh", OPT_MAX_HEIGHT, true, "maximum z-value, every higher value is clipped to no data value" );
opts.addOption( opt );
CommandUtils.addDefaultOptions( opts );
return opts;
}
代码示例来源:origin: org.parallelj/parallelj-launching
public AsyncLaunchArgsOption() {
this.option = OptionBuilder.create("a");
this.option.setLongOpt("args");
this.option.setArgs(100);
this.option.setArgName("arg1=value1 arg2=value2 ... argx=valueX");
this.option.setDescription("Arguments of the Program");
this.option.setRequired(false);
}
代码示例来源:origin: org.parallelj/parallelj-launching
public AsyncLaunchIdOption() {
this.option = OptionBuilder.create("i");
this.option.setLongOpt("id");
this.option.setArgs(1);
this.option.setArgName("id");
this.option
.setDescription("Id of the Program from the list return by ll command");
this.option.setRequired(true);
}
代码示例来源:origin: org.parallelj/parallelj-launching
public SyncLaunchArgsOption() {
this.option = OptionBuilder.create("a");
this.option.setLongOpt("args");
this.option.setArgs(100);
this.option.setArgName("arg1=value1 arg2=value2 ... argx=valueX");
this.option.setDescription("Arguments of the Program");
this.option.setRequired(false);
}
代码示例来源:origin: org.parallelj/parallelj-launching
public SyncLaunchIdOption() {
this.option = OptionBuilder.create("i");
this.option.setLongOpt("id");
this.option.setArgs(1);
this.option.setArgName("id");
this.option.setDescription("Id of the Program from the list return by ll command");
this.option.setRequired(true);
}
代码示例来源:origin: cereda/arara
version.setDescription(
messages.getMessage(
Messages.INFO_PARSER_VERSION_DESCRIPTION
help.setDescription(
messages.getMessage(
Messages.INFO_PARSER_HELP_DESCRIPTION
log.setDescription(
messages.getMessage(
Messages.INFO_PARSER_LOG_DESCRIPTION
verbose.setDescription(
messages.getMessage(
Messages.INFO_PARSER_VERBOSE_MODE_DESCRIPTION
silent.setDescription(
messages.getMessage(
Messages.INFO_PARSER_SILENT_MODE_DESCRIPTION
dryrun.setDescription(
messages.getMessage(
Messages.INFO_PARSER_DRYRUN_MODE_DESCRIPTION
timeout.setDescription(
messages.getMessage(
Messages.INFO_PARSER_TIMEOUT_DESCRIPTION
language.setDescription(
代码示例来源:origin: com.conversantmedia/mara-core
/**
* Override the
* @param source
* @param base
*/
private void updateOption(Option source,
org.apache.commons.cli.Option base) {
if (StringUtils.isNotBlank(source.description())) {
base.setDescription(source.description());
}
if (StringUtils.isNotBlank(source.argName())) {
base.setArgName(source.argName());
}
if (source.argCount() > 0) {
base.setArgs(source.argCount());
}
if (!base.isRequired()) {
base.setRequired(source.required());
}
}
内容来源于网络,如有侵权,请联系作者删除!