1

Is there any way, xsd tags for instance, to unmarshall xsd files to get private fields with accessor methods instead of protected fields which is the default behaviour? I have tried to search in the documentation but no avail.

I am aware of the plugin plugin solution here on stackoverflow but I would like to have a xsd-tag or a built-in solution on existing technologies, not extra things to handle like writing a plugins that requires extra maintenance cost =)

Community
  • 1
  • 1
Mike
  • 397
  • 2
  • 16
  • JAXB can unmarshal to private fields. The fields generated from an XML Schema are protected. Are you asking how to generate private fields? – bdoughan Aug 14 '14 at 11:21
  • Yes, I am looking specifically for inline xsd/jaxb xml fragments to include in the xsd file to acheive this on the xsd artifact only OR if there are undocumented jaxb (using xjc) parameters that can achieve the same OR if there some even more smart solution – Mike Aug 14 '14 at 12:00
  • I think the new more narrow question make the duplicate tag obsolete OR ... – Mike Aug 18 '14 at 12:22
  • The linked question is: Why are protected fields generated and how to change it to private? Your question is: How to change it to private? The other question has a good answer, is there something I'm missing? – bdoughan Aug 18 '14 at 13:17
  • Now I have also updated the question heading, good point. – Mike Aug 19 '14 at 16:03
  • I have reopened the question. – bdoughan Aug 19 '14 at 16:08

0 Answers0