"adrian(a)jboss.org" wrote :
| You don't need to code this yourself. Just add @XmlEnumValues to the enum class.
| JBoss/AXB already knows how to parse enums.
Does this include the old JBossXB handlers?
e.g.
| public class InjectionHandler extends DefaultElementHandler
| {
| ...
|
| public void attributes(Object o, QName elementName, ElementBinding element,
Attributes attrs, NamespaceContext nsCtx)
| {
| AbstractInjectionValueMetaData injection = (AbstractInjectionValueMetaData) o;
| for (int i = 0; i < attrs.getLength(); ++i)
| {
| String localName = attrs.getLocalName(i);
| ...
| else if ("type".equals(localName))
| injection.setInjectionType(AutowireType.getInstance(attrs.getValue(i)));
| else if ("option".equals(localName))
|
injection.setInjectionOption(InjectOption.getInstance(attrs.getValue(i)));
| else if ("fromContext".equals(localName))
| injection.setFromContext(FromContext.getInstance(attrs.getValue(i)));
| }
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134872#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...