Another refactoring question. :-)
Since for xml handling I still need to get the right enum by matching the underlying
strings.
The thing is that on enums there is already a valueOf method which does similar thing,
matching enum's name with input string parameter.
But in our case the names do not match exactly the underlying strings, resulting in
needing something like getInstance method which iterates over the enums and does a string
match.
Should I just use the valueOf and fix the strings in our tests?
Probably not, since it will break quite some things. :-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134852#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...