Enums and fromValue
I just ported my project over to JAXB 2.0 to try it out. I have the 20050407 RI, and for the most part everything seems to be going good, and 2.0 fixed a lot of my annoyances with 1.0.4.
One problem I am having relates to enums. (I am new to Java 1.5 so if I am missing anything obvious let me know.) In my app I am manually creating a JAXB object tree then marshalling it to XML. I have to get the enum represented by the value I have as a string. I can't use valueOf() to get at the proper enum class, because I have the value instead of the constant name, and the name might be changed to meet Java naming requirements (e.g. if the string is "1" the constant will be named "_1"). According to the spec, it looks like a fromValue() method is supposed to be generated in the enum class to support this use case, but I don't have one. Am I reading that right, and does the RI do that yet? I can post a schema excerpt if needed.