XJC superinterface and superclass only for all classes?

本小妞迷上赌 提交于 2020-01-01 09:00:10

问题


I'm trying to automatically implement an interface in one java class generated from a xsd file.

This looks as if it could do that, but it will only add implements SomeInterface to all classes, which is completly stupid. Am I missing something or can you only do this for all classes? Doesn't really make too much sence to let all generated classes implement the same interface. Can I use this feature for one class only?


回答1:


You could use Inheritance extension provided by JAXB2 Basics Plugins. This works for particular classes (i.e. xsd:complexTypes)

This is also described in answers of this question: Generating a JAXB class that implements an interface



来源:https://stackoverflow.com/questions/9926402/xjc-superinterface-and-superclass-only-for-all-classes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!