[jboss-dev-forums] [Design of JBossXB] - Re: Extending EnumValueAdapter

alesj do-not-reply at jboss.com
Tue Mar 18 07:06:21 EDT 2008


"adrian at jboss.org" wrote : 
  | Everything is a String in xml :-)
Yeah, but your key might not be.

  |          Object key = enumValue;
  |          try
  |          {
  |             key = enumType.convertValue(enumValue, false);
  |          }
  |          catch (Throwable t)
  |          {
  |             throw new RuntimeException("Error for enum " + enumInfo.getName() + " unable to convert " + enumValue + " to " + enumType.getName());
  |          }
  |          Object value = constant.getValue();
  |          valid.put(key, value);
  | 

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

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



More information about the jboss-dev-forums mailing list