I want to explicitly map fields in my classes to XML, so I’m using @XmlAccessorType(XmlAccessType.NONE) at the package level via package-info.java. However, since I have multiple distinct packages, I’m wondering: is there a way to set XmlAccessType.NONE globally? I couldn’t find anything in the unofficial guide (http://jaxb.java.net/guide/), but I certainly could have missed something.
I want to explicitly map fields in my classes to XML, so I’m using
Share
There isn’t a global setting. Configuring this at the package level is the broadest scope available with JAXB (JSR-222).
For More Information on
@XmlAccessorType