[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: enums, generics and other animals

adrian@jboss.org do-not-reply at jboss.com
Fri Mar 7 09:56:40 EST 2008


"alesj" wrote : 
  | But I'll stick to getInstance. ;-)

You don't need to code this yourself. Just add @XmlEnumValues to the enum class.
JBoss/AXB already knows how to parse enums. It's things like ControllerState
that it doesn't know how to do.

You'd just be reinventing this:
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/common/jbossxb/trunk/src/main/java/org/jboss/xb/builder/runtime/EnumValueAdapter.java?revision=2545&view=markup

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134870#4134870

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134870



More information about the jboss-dev-forums mailing list