[jboss-dev-forums] [Design of JBossXB] - Re: Extending EnumValueAdapter
adrian@jboss.org
do-not-reply at jboss.com
Tue Mar 18 06:03:29 EDT 2008
"alesj" wrote : An 'issue' I stumbled upon today, perhaps being worth a new feature.
| It would be cool if we could make EnumValueAdapter be case unaware for String keys.
| Probably the best way to impl this is to extend EVA, where we before provide proper hooks.
| And the user than sets this as a ValueAdapter for his enum.
|
| What do you think?
|
| ps: I've already got a working impl locally :-)
Just do something like
| @JBossXmlEnum(ignoreCase=true)
| public enum MyEnum {}
|
Then when constructing the map of valid values and doing the lookups
convert the xml values to lower case if the "ignoreCase" is true.
The user shouldn't have to write code for this feature when it can
be made declaritive.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137317#4137317
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137317
More information about the jboss-dev-forums
mailing list