I'm trying to achieve some advanced Java source generation from XSD with JAXB/XJC. What I want do to is the following: "group" and "attributeGroup" declarations, in a Java context, can be seen as "interface" declarations: They prescribe a specific set of features supported by a type referencing the "group" or "attributeGroup". I am now looking for a way to automatically generate an interface declaration for each "group"/"attributeGroup" and at the same time generate interface implementation declarations on the respective generated classes. Is there a plug-in or setting in XJC to achieve this? Is there any other solution to this scenario you know of?
Ok, now to answer my own question, I have created my own jaxb / xjc plugin to perform this task. It is hosted on GitHub:
https://github.com/mklemm/jaxb2-rich-contract-plugin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With