Xsd JAXB:防止重新生成类
我很难让课程再生。我是 我有一个模式a,它被导入到模式B中。然后模式B被导入到模式C中 在模式A中,我有两个SimpleType,它们是字符串的枚举:Xsd JAXB:防止重新生成类,xsd,jaxb,Xsd,Jaxb,我很难让课程再生。我是 我有一个模式a,它被导入到模式B中。然后模式B被导入到模式C中 在模式A中,我有两个SimpleType,它们是字符串的枚举: <xs:simpleType name="blah_type"> <xs:restriction base="xs:string"> <xs:enumeration value="blah_1"/> <xs:enumeration value="blah_2"/>
<xs:simpleType name="blah_type">
<xs:restriction base="xs:string">
<xs:enumeration value="blah_1"/>
<xs:enumeration value="blah_2"/>
<xs:enumeration value="blah_3"/>
<xs:enumeration value="blah_4"/>
<xs:enumeration value="blah_5"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="another_blah_type">
<xs:restriction base="xs:string">
<xs:enumeration value="another_blah_1"/>
<xs:enumeration value="another_blah_2"/>
<xs:enumeration value="another_blah_3"/>
<xs:enumeration value="another_blah_4"/>
<xs:enumeration value="another_blah_5"/>
</xs:restriction>
</xs:simpleType>
论文生成生成的类。在模式C中,与这些枚举相对应的类不断被重新生成,当然是在错误的位置。我以这种方式添加对现有类的引用:()
我还有其他类型(complexTypes和非枚举simpleTypes),这些类型的一切都很好
感谢您的帮助。您可以使用插曲文件进行模块化架构编译:
<jaxb:bindings node="//xs:simpleType[@name='blah_type']">
<jaxb:class ref="com.stuff.otherstuff.really.deep.BlahType"/>
</jaxb:bindings>