[jboss-dev-forums] [Design of JBossXB] - Re: Extending EnumValueAdapter
adrian@jboss.org
do-not-reply at jboss.com
Tue Mar 18 07:14:21 EDT 2008
It's not about the underlying value its about recognising which xml string value
maps to which enum value.
You still haven't done what I told you to do.
So its not surpising you don't get it :-)
e.g.
| @JBossXmlEnum(ignoreCase=true)
| public enum ControllerMode
| {
| @XmlEnumValue("Automatic")
| AUTOMATIC("Automatic"),
| ...
| }
|
would mean "automatic" in the xml gets converted to the "AUTOMATIC" enum value.
| @XmlEnum(type=Integer.class)
| @JBossXmlEnum(ignoreCase=true)
| public enum Numbers
| {
| @XmlEnumValue("ONE")
| ONE(1),
| }
|
Would mean that "one" in the xml gets translated to the ONE enum value.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137364#4137364
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137364
More information about the jboss-dev-forums
mailing list