org.apache.avro.reflect.Union.value()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.7k)|赞(0)|评价(0)|浏览(131)

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

Union.value介绍

暂无

代码示例

代码示例来源:origin: apache/avro

private Schema getAnnotatedUnion(Union union, Map<String,Schema> names) {
 List<Schema> branches = new ArrayList<>();
 for (Class branch : union.value())
  branches.add(createSchema(branch, names));
 return Schema.createUnion(branches);
}

代码示例来源:origin: org.apache.avro/avro

private Schema getAnnotatedUnion(Union union, Map<String,Schema> names) {
 List<Schema> branches = new ArrayList<Schema>();
 for (Class branch : union.value())
  branches.add(createSchema(branch, names));
 return Schema.createUnion(branches);
}

代码示例来源:origin: FasterXML/jackson-dataformats-binary

protected Class<?>[] _getUnionTypes(Annotated a) {
    Union ann = _findAnnotation(a, Union.class);
    if (ann != null) {
      // 14-Apr-2017, tatu: I think it makes sense to require non-empty List, as this allows
      //   disabling annotation with overrides. But one could even consider requiring more than
      //   one (where single type is not really polymorphism)... for now, however, just one
      //   is acceptable, and maybe that has valid usages.
      Class<?>[] c = ann.value();
      if (c.length > 0) {
        return c;
      }
    }
    return null;
  }
}

代码示例来源:origin: org.apache.hadoop/avro

private Schema getAnnotatedUnion(Union union, Map<String,Schema> names) {
 List<Schema> branches = new ArrayList<Schema>();
 for (Class branch : union.value())
  branches.add(createSchema(branch, names));
 return Schema.createUnion(branches);
}

代码示例来源:origin: com.facebook.presto.hive/hive-apache

private Schema getAnnotatedUnion(Union union, Map<String,Schema> names) {
 List<Schema> branches = new ArrayList<Schema>();
 for (Class branch : union.value())
  branches.add(createSchema(branch, names));
 return Schema.createUnion(branches);
}

代码示例来源:origin: org.apache.cassandra.deps/avro

private Schema getAnnotatedUnion(Union union, Map<String,Schema> names) {
 List<Schema> branches = new ArrayList<Schema>();
 for (Class branch : union.value())
  branches.add(createSchema(branch, names));
 return Schema.createUnion(branches);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.avro

private Schema getAnnotatedUnion(Union union, Map<String,Schema> names) {
 List<Schema> branches = new ArrayList<Schema>();
 for (Class branch : union.value())
  branches.add(createSchema(branch, names));
 return Schema.createUnion(branches);
}

代码示例来源:origin: apache/crunch

private Schema getAnnotatedUnion(Union union, Map<String,Schema> names) {
 List<Schema> branches = new ArrayList<Schema>();
 for (Class branch : union.value())
  branches.add(createSchema(branch, names));
 return Schema.createUnion(branches);
}

相关文章

微信公众号

最新文章

更多