org.vertx.java.core.json.JsonArray.get()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(105)

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

JsonArray.get介绍

暂无

代码示例

代码示例来源:origin: com.englishtown/vertx-mod-cassandra

protected void initSeeds(JsonArray seeds) {
  // Get array of IPs, default to localhost
  if (seeds == null || seeds.size() == 0) {
    this.seeds = DEFAULT_SEEDS;
    return;
  }
  this.seeds = new ArrayList<>();
  for (int i = 0; i < seeds.size(); i++) {
    this.seeds.add(seeds.<String>get(i));
  }
}

代码示例来源:origin: com.englishtown/vertx-mod-when

/**
 * Deploys one or more modules.  The Json is of the structure:
 * [ {
 * "name": "groupId~artifactId~version",
 * "instances": 1,
 * "config": {}
 * } ]
 *
 * @param modules
 * @return
 */
@Override
public List<Promise<String>> deployModules(JsonArray modules) {
  List<Promise<String>> promises = new ArrayList<>();
  if (modules == null) {
    return promises;
  }
  for (int i = 0; i < modules.size(); i++) {
    JsonObject module = modules.get(i);
    String name = module.getString("name");
    if (name != null && !name.isEmpty()) {
      int instances = module.getInteger("instances", 1);
      JsonObject config = module.getObject("config", new JsonObject());
      promises.add(deployModule(name, config, instances));
    }
  }
  return promises;
}

代码示例来源:origin: com.englishtown/vertx-mod-jersey

resourceArr[i] = resources.get(i);
for (int i = 0; i < features.size(); i++) {
  try {
    Class<?> clazz = cl.loadClass(features.get(i));
    rc.register(clazz);
  } catch (ClassNotFoundException e) {
for (int i = 0; i < binders.size(); i++) {
  try {
    Class<?> clazz = cl.loadClass(binders.get(i));
    rc.register(clazz.newInstance());
  } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {

代码示例来源:origin: com.englishtown/vertx-mod-hk2

String bootstrapName = bootstrapNames.get(i);
try {
  Class bootstrapClass = cl.loadClass(bootstrapName);

相关文章