本文整理了Java中org.apache.felix.gogo.commands.Option.name()
方法的一些代码示例,展示了Option.name()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Option.name()
方法的具体详情如下:
包路径:org.apache.felix.gogo.commands.Option
类名称:Option
方法名:name
暂无
代码示例来源:origin: apache/karaf
@Override
public String name() {
return oldOption.name();
}
代码示例来源:origin: org.apache.felix.gogo/org.apache.felix.gogo.commands
out.print(option.name());
out.print(" ");
if (option.aliases().length > 0)
代码示例来源:origin: org.apache.felix.gogo/org.apache.felix.gogo.commands
Object param = it.next();
if (HELP.name().equals(param) || Arrays.asList(HELP.aliases()).contains(param)) {
printUsage(action.getClass().getAnnotation(Command.class), options.keySet(), arguments.keySet(), System.out);
return false;
if (name.equals(opt.name()) || Arrays.binarySearch(opt.aliases(), name) >= 0) {
option = opt;
break;
throw new IllegalArgumentException("Option " + option.name() + " is required");
代码示例来源:origin: apache/karaf
if (option != null) {
fields.put(option, field);
options.put(option.name(), option);
String[] aliases = option.aliases();
if (aliases != null) {
代码示例来源:origin: apache/karaf
if (option != null) {
fields.put(option, field);
options.put(option.name(), option);
String[] aliases = option.aliases();
if (aliases != null) {
代码示例来源:origin: apache/karaf
if (option != null) {
Completer optionValueCompleter = null;
String name = option.name();
if (optionalCompleters != null && name != null) {
optionValueCompleter = optionalCompleters.get(name);
代码示例来源:origin: apache/karaf
if (option != null) {
Completer optionValueCompleter = null;
String name = option.name();
if (optionalCompleters != null && name != null) {
optionValueCompleter = optionalCompleters.get(name);
代码示例来源:origin: apache/karaf
out.println(INTENSITY_BOLD + "OPTIONS" + INTENSITY_NORMAL);
for (Option option : options) {
String opt = option.name();
for (String alias : option.aliases()) {
opt += ", " + alias;
代码示例来源:origin: apache/karaf
if (HELP.name().equals(param) || Arrays.asList(HELP.aliases()).contains(param)) {
printUsage(session, action, options, arguments, System.out);
return false;
if (name.equals(opt.name()) || Arrays.asList(opt.aliases()).contains(name)) {
option = opt;
break;
+ INTENSITY_BOLD + command.name() + INTENSITY_NORMAL
+ ": option "
+ INTENSITY_BOLD + option.name() + INTENSITY_NORMAL
+ " is required"
+ COLOR_DEFAULT,
"Option " + option.name() + " is required"
);
} else {
throw new CommandException("Option " + option.name() + " is required");
+ INTENSITY_BOLD + command.name() + INTENSITY_NORMAL
+ ": unable to convert option "
+ INTENSITY_BOLD + entry.getKey().name() + INTENSITY_NORMAL
+ " with value '" + entry.getValue() + "' to type "
+ new GenericType(field.getGenericType()).toString()
+ COLOR_DEFAULT,
"Unable to convert option " + entry.getKey().name() + " with value '"
+ entry.getValue() + "' to type " + new GenericType(field.getGenericType()).toString(),
throw new CommandException("Unable to convert option " + entry.getKey().name() + " with value '"
+ entry.getValue() + "' to type " + new GenericType(field.getGenericType()).toString(),
代码示例来源:origin: org.apache.felix.karaf.shell/org.apache.felix.karaf.shell.console
for (Option option : options)
String opt = option.name();
for (String alias : option.aliases())
内容来源于网络,如有侵权,请联系作者删除!