I'm a bit puzzled by this one. The docs rather glibly say:
Every non static, non transient field in a JAXB-bound class will be automatically bound to XML, unless annotated by XmlTransient. Getter/setter pairs are bound to XML only when they are explicitly annotated by some of the JAXB annotations.
Which leaves me wondering when compared to the other enum values, "if the field isn't public, and doesn't have a getter/setter pair, then how will the code get to the value?"
Options I've considered include:
1. private element, with a get OR set method, but not both, for one-way conversion. The examples I've seen seem to all have a private field with a get method but no set method. If this is the case, then is private field with only a set method OK as well, for XML to
Java conversion only?
2. protected field, and somehow an adapter class gets created which exposes the field with public methods
Or could it be something else entirely?