本文整理了Java中com.sun.tools.xjc.model.Model.enums()
方法的一些代码示例,展示了Model.enums()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Model.enums()
方法的具体详情如下:
包路径:com.sun.tools.xjc.model.Model
类名称:Model
方法名:enums
[英]Generated enums.
[中]生成的枚举。
代码示例来源:origin: nokia/Avro-Schema-Generator
private void inferAvroSchema(Outline outline) {
Model model = outline.getModel();
Set<NamedAvroType> avroTypes = new HashSet<NamedAvroType>();
// enums
for (Map.Entry<NClass, CEnumLeafInfo> entry : model.enums().entrySet()) {
CEnumLeafInfo info = entry.getValue();
NamedAvroType type = helper.avroFromEnum(info);
avroTypes.add(type);
}
// regular classes
for (Map.Entry<NClass, CClassInfo> entry : model.beans().entrySet()) {
CClassInfo info = entry.getValue();
NamedAvroType type = helper.avroFromClass(info);
avroTypes.add(type);
}
// grab a package context, write the schemas
PackageOutline aPackage = outline.getAllPackageContexts().iterator().next();
JPackage rootPackage = aPackage._package().owner().rootPackage();
generateAvroSchemas(rootPackage, avroTypes);
}
代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc
for( CEnumLeafInfo p : model.enums().values() )
enums.put( p, generateEnumDef(p) );
代码示例来源:origin: sun-jaxb/jaxb-xjc
for( CEnumLeafInfo p : model.enums().values() )
enums.put( p, generateEnumDef(p) );
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-xjc
for (CEnumLeafInfo p : model.enums().values()) {
enums.put(p, generateEnumDef(p));
代码示例来源:origin: org.glassfish.metro/webservices-tools
for (CEnumLeafInfo p : model.enums().values()) {
enums.put(p, generateEnumDef(p));
代码示例来源:origin: apache/servicemix-bundles
for (CEnumLeafInfo p : model.enums().values()) {
enums.put(p, generateEnumDef(p));
内容来源于网络,如有侵权,请联系作者删除!