I have been searching the internet for a reason why JAXB generated classes have protected members (all of them, regardless of inheritance).
I would like the members to be private instead.
My search has come up empty.
I have normal xsd files which are converted into Java classes using Maven and JAXB. Ideally the generated members should be private but I cannot find a way to achieve this.
Is there a way to modify this default behaviour?
Well, I am going to respond to my own question. Creating a plugin was the right way to go.
I wrote the following plugin and it seems to work.
Feel free to use this if you want.
I think the only way to achieve this is to develop a JXC plugin yourself, search google for samples.
Luckily, question owner has developed and shared the plugin.