JAXB Customizations and List<Object>
Posted
by DaUltimateTrooper
on Stack Overflow
See other posts from Stack Overflow
or by DaUltimateTrooper
Published on 2010-02-03T13:26:05Z
Indexed on
2010/03/29
2:53 UTC
Read the original article
Hit count: 270
Hi everybody.
I used JAXB to create some classes from an XSD. The result was not quite what I expected and most probably it can be customized.
It created a generic list instead of 3 different lists. Can this be corrected somehow?
@XmlElements({
@XmlElement(name = "M1", type = M1_Type.class),
@XmlElement(name = "M2", type = M2_Type.class),
@XmlElement(name = "M3", type = M3_Type.class)
})
protected List<Object> m1Orm2OrM3;
Is there a customization to fix this?
© Stack Overflow or respective owner