'Jaxb not exposed field
I have a class that allows me to do marshaling and unmarshaling.
I would like one of the fields not to be exposed to do internal API processing, but at compile time, the field in question must be specified in the props orders.
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "fieldOne", "fieldTwo"} )
public class MyClass implements Serializable {
protected String fieldOne;
protected String fieldTwo;
protected String fieldDontExposed;
...
getters & setters here
}
I would not like to put the fieldDontExposed field in the propOrder.
Thanks for your help !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
