Using JAXB, we generate our Java beans directly. In the XSD, we have an enumerated type:
JAXB generates an enumerated type for the field using this type. We would like to have it converted to a String in the generated Java class, because those classes are mapped to ActionScript classes, and there is no enumerated type in ActionScript.
Is there a way to do it, implementing some kind of converter ? May be with [XmlJavaTypeAdapter] ?
: http://weblogs.java.net/blog/kohsuke/archive/2005/09/using_jaxb_20s.html You can always use the toString or the name methods of the enum, surely? :-)
以上就是JAXB - generating classes from XSD - converting enums to strings的详细内容，更多请关注web前端其它相关文章！