marshalled = ((Boolean)value).booleanValue() ? "true" : "false";
}
}
else
{
StringList lexicalEnumeration = type.getLexicalEnumeration();
if(lexicalEnumeration != null && lexicalEnumeration.getLength() > 0)
{
Method getValue;
try
{
getValue = value.getClass().getMethod("value", null);
}
catch(NoSuchMethodException e)
{
try
{
getValue = value.getClass().getMethod("getValue", null);
}
catch(NoSuchMethodException e1)
{
List values = new ArrayList(lexicalEnumeration.getLength());
for(int i = 0; i < lexicalEnumeration.getLength(); ++i)
{
values.add(lexicalEnumeration.item(i));
}
throw new JBossXBRuntimeException("Failed to find neither value() nor getValue() in " +
value.getClass() +
" which is bound to enumeration type (" +