本文整理了Java中org.kohsuke.args4j.Option.aliases()
方法的一些代码示例,展示了Option.aliases()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Option.aliases()
方法的具体详情如下:
包路径:org.kohsuke.args4j.Option
类名称:Option
方法名:aliases
暂无
代码示例来源:origin: kohsuke/args4j
/**
* Programmatically defines an option (instead of reading it from annotations as normal).
*
* @param setter the setter for the type
* @param o the {@code Option}
* @throws NullPointerException if {@code setter} or {@code o} is {@code null}.
* @throws IllegalAnnotationError if the option name or one of the aliases is already taken.
*/
public void addOption(Setter setter, Option o) {
checkNonNull(setter, "Setter");
checkNonNull(o, "Option");
checkOptionNotInMap(o.name());
for (String alias : o.aliases()) {
checkOptionNotInMap(alias);
}
options.add(createOptionHandler(new NamedOptionDef(o), setter));
}
代码示例来源:origin: args4j/args4j
/**
* Programmatically defines an option (instead of reading it from annotations as normal).
*
* @param setter the setter for the type
* @param o the {@code Option}
* @throws NullPointerException if {@code setter} or {@code o} is {@code null}.
* @throws IllegalAnnotationError if the option name or one of the aliases is already taken.
*/
public void addOption(Setter setter, Option o) {
checkNonNull(setter, "Setter");
checkNonNull(o, "Option");
checkOptionNotInMap(o.name());
for (String alias : o.aliases()) {
checkOptionNotInMap(alias);
}
options.add(createOptionHandler(new NamedOptionDef(o), setter));
}
代码示例来源:origin: kohsuke/args4j
public NamedOptionDef(Option o) {
super(o.usage(),o.metaVar(),o.required(),o.help(),o.hidden(),o.handler(),false);
this.name = o.name();
this.aliases = createZeroSizedArrayIfNull(o.aliases());
this.depends = createZeroSizedArrayIfNull(o.depends());
this.forbids = createZeroSizedArrayIfNull(o.forbids());
}
代码示例来源:origin: args4j/args4j
public NamedOptionDef(Option o) {
super(o.usage(),o.metaVar(),o.required(),o.help(),o.hidden(),o.handler(),false);
this.name = o.name();
this.aliases = createZeroSizedArrayIfNull(o.aliases());
this.depends = createZeroSizedArrayIfNull(o.depends());
this.forbids = createZeroSizedArrayIfNull(o.forbids());
}
代码示例来源:origin: Nextdoor/bender
/**
* Programmatically defines an option (instead of reading it from annotations as normal).
*
* @param setter the setter for the type
* @param o the {@code Option}
* @throws NullPointerException if {@code setter} or {@code o} is {@code null}.
* @throws IllegalAnnotationError if the option name or one of the aliases is already taken.
*/
public void addOption(Setter setter, Option o) {
checkNonNull(setter, "Setter");
checkNonNull(o, "Option");
checkOptionNotInMap(o.name());
for (String alias : o.aliases()) {
checkOptionNotInMap(alias);
}
options.add(createOptionHandler(new NamedOptionDef(o), setter));
}
代码示例来源:origin: org.zenframework.z8.dependencies.minimizers/closure
/**
* Programmatically defines an option (instead of reading it from annotations as normal).
*
* @param setter the setter for the type
* @param o the {@code Option}
* @throws NullPointerException if {@code setter} or {@code o} is {@code null}.
* @throws IllegalAnnotationError if the option name or one of the aliases is already taken.
*/
public void addOption(Setter setter, Option o) {
checkNonNull(setter, "Setter");
checkNonNull(o, "Option");
checkOptionNotInMap(o.name());
for (String alias : o.aliases()) {
checkOptionNotInMap(alias);
}
options.add(createOptionHandler(new NamedOptionDef(o), setter));
}
代码示例来源:origin: Nextdoor/bender
public NamedOptionDef(Option o) {
super(o.usage(),o.metaVar(),o.required(),o.help(),o.hidden(),o.handler(),false);
this.name = o.name();
this.aliases = createZeroSizedArrayIfNull(o.aliases());
this.depends = createZeroSizedArrayIfNull(o.depends());
this.forbids = createZeroSizedArrayIfNull(o.forbids());
}
代码示例来源:origin: org.zenframework.z8.dependencies.minimizers/closure
public NamedOptionDef(Option o) {
super(o.usage(),o.metaVar(),o.required(),o.help(),o.hidden(),o.handler(),false);
this.name = o.name();
this.aliases = createZeroSizedArrayIfNull(o.aliases());
this.depends = createZeroSizedArrayIfNull(o.depends());
this.forbids = createZeroSizedArrayIfNull(o.forbids());
}
内容来源于网络,如有侵权,请联系作者删除!