Given the following annotations
@XmlElements({
@XmlElement(name = "first", type = First.class),
@XmlElement(name = "second", type = Second.class),
@XmlElement(name = "third", type = Third.class),
@XmlElement(name = "fourth", type = Fourth.class),
@XmlElement(name = "fifth", type = Fifth.class),
@XmlElement(name = "sixth", type = Sixth.class),
@XmlElement(name = "seventh", type = Seventh.class)})
private List<Dimension> dimensions = new ArrayList<>();
And because of some funny legacy logic, I need to provide an adapter for Third.class.
@XmlJavaTypeAdapter(ThirdAdapter.class)
public class Third implements Dimension
However, ThirdAdapter never seems to be called. Is @XmlJavaTypeAdapter compatible with @XmlElements? Or is there a better solution to this?