Constructor ctor = cls.getConstructor(null);
o = ctor.newInstance(null);
}
catch(NoSuchMethodException e)
{
o = new ValueListInitializer().newValueList(ValueListHandler.NON_DEFAULT_CTOR, cls);
}
catch(Exception e)
{
throw new JBossXBRuntimeException("Failed to create an instance of " +
cls +
" using default constructor for element " +
elementName + ": " + e.getMessage(), e
);
}
}
else if(ctors.length > 1 || ctors[0].getParameterTypes().length > 0)
{
o = new ValueListInitializer().newValueList(ValueListHandler.NON_DEFAULT_CTOR, cls);
}
else
{
try
{