net.sourceforge.argparse4j.inf.Namespace.get()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中net.sourceforge.argparse4j.inf.Namespace.get()方法的一些代码示例,展示了Namespace.get()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Namespace.get()方法的具体详情如下:
包路径:net.sourceforge.argparse4j.inf.Namespace
类名称:Namespace
方法名:get

Namespace.get介绍

[英]Returns attribute with given attribute name dest.
[中]返回具有给定属性名dest的属性。

代码示例

代码示例来源:origin: spotify/helios

public Path getServiceRegistrarPlugin() {
 final File plugin = options.get(serviceRegistrarPluginArg.getDest());
 return plugin != null ? plugin.toPath() : null;
}

代码示例来源:origin: spotify/helios

public LoggingConfig getLoggingConfig() {
 return new LoggingConfig(options.getInt(verboseArg.getDest()),
   options.getBoolean(syslogArg.getDest()),
   (File) options.get(logconfigArg.getDest()),
   options.getBoolean(noLogSetupArg.getDest()));
}

代码示例来源:origin: dropwizard/dropwizard

@Override
public void run(Namespace namespace, Liquibase liquibase) throws Exception {
  final String tag = namespace.getString("tag");
  final Integer count = namespace.getInt("count");
  final Date date = namespace.get("date");
  final boolean dryRun = namespace.getBoolean("dry-run") == null ? false : namespace.getBoolean("dry-run");
  final String context = getContext(namespace);
  if (Stream.of(tag, count, date).filter(Objects::nonNull).count() != 1) {
    throw new IllegalArgumentException("Must specify either a count, a tag, or a date.");
  }
  if (count != null) {
    if (dryRun) {
      liquibase.rollback(count, context, new OutputStreamWriter(outputStream, StandardCharsets.UTF_8));
    } else {
      liquibase.rollback(count, context);
    }
  } else if (tag != null) {
    if (dryRun) {
      liquibase.rollback(tag, context, new OutputStreamWriter(outputStream, StandardCharsets.UTF_8));
    } else {
      liquibase.rollback(tag, context);
    }
  } else {
    if (dryRun) {
      liquibase.rollback(date, context, new OutputStreamWriter(outputStream, StandardCharsets.UTF_8));
    } else {
      liquibase.rollback(date, context);
    }
  }
}

代码示例来源:origin: spotify/helios

String domainsSwitchString = "";
final List<String> domains = options.get("domains");
if (domains.size() > 0) {
 domainsSwitchString = "-d " + Joiner.on(",").join(domains);

代码示例来源:origin: spotify/helios

this.command = options.get("command");
final String username = options.getString(globalArgs.usernameArg.getDest());
this.username = (username == null) ? cliConfig.getUsername() : username;

代码示例来源:origin: lenskit/lenskit

File getOutputFile() {
    return options.get("output_file");
  }
}

代码示例来源:origin: atomix/atomix

final List<File> configFiles = namespace.getList("config");
final String memberId = namespace.getString("member");
final Address address = namespace.get("address");
final String host = namespace.getString("host");
final String rack = namespace.getString("rack");
final List<NodeConfig> bootstrap = namespace.getList("bootstrap");
final boolean multicastEnabled = namespace.getBoolean("multicast");
final String multicastGroup = namespace.get("multicast_group");
final Integer multicastPort = namespace.get("multicast_port");

代码示例来源:origin: lenskit/lenskit

int getListSize() {
    return options.get("list_size");
  }
}

代码示例来源:origin: spotify/helios

final File file = options.get(fileArg.getDest());

代码示例来源:origin: lenskit/lenskit

OutputType getOutputType() {
    return options.get("output_type");
  }
}

代码示例来源:origin: spotify/helios

options.get(this.googleCloudCredentialsFile.getDest());

代码示例来源:origin: lenskit/lenskit

List<File> getConfigFiles() {
  return options.get("config");
}

代码示例来源:origin: lenskit/lenskit

File getOutputFile() {
  return options.get("output_file");
}

代码示例来源:origin: lenskit/lenskit

private File getSpecFile(Namespace options) {
  return options.get("config_file");
}

代码示例来源:origin: lenskit/lenskit

List<File> getConfigFiles() {
  return options.get("config");
}

代码示例来源:origin: lenskit/lenskit

public static String getDelimiter(Namespace opts) {
  return opts.get("delimiter");
}

代码示例来源:origin: lenskit/lenskit

File getOutputFile() {
  return options.get("output_file");
}

代码示例来源:origin: lenskit/lenskit

long getRebuildPeriod() {
  return options.get("rebuild_period");
}

代码示例来源:origin: lenskit/lenskit

File getExtendedOutputFile() {
  return options.get("extended_output");
}

代码示例来源:origin: lenskit/lenskit

File getConfigFile() {
  return options.get("config");
}

相关文章