I am using maven-jaxb2-plugin to create java classes from xsd. In xsd I have defined two status: Status1 and Status2. This two classes has a lot of similar variables. Because I cant edit xsd is there a option to create class Status in my project and then add change generated class to extend this class?
Example
now:
Class Status1 {...}
Class Status2 {...}
- this is generated by maven-jaxb2-plugin
What I want:
Class Status1 extends Status {...}
Class Status2 extends Status {...}
- this is generated by maven-jaxb2-plugin
Class Status {...}
- my own class
I hope this can be done by bindings but I dont know how
UPDATE:
second option how to achieve this question is to add to class Status1 new variable. Is this possible ?
What I want:
Class Status1 {... NewVariable newVariable ...}
Class Status2 {...}
- this is generated by maven-jaxb2-plugin