Map props = (Map)src;
String c = (String)props.remove(CLASS_PROPERTY);
Class clazz = getReturnClass();
if(c==null && clazz.equals(Object.class))
{
throw new TransformerException(CoreMessages.transforemrMapBeanClassNotSet());
}
else if (c!=null)
{
clazz = ClassUtils.loadClass(c, getClass());
}
Object result = ClassUtils.instanciateClass(clazz, ClassUtils.NO_ARGS);
BeanUtils.populate(result, props);
return result;
}
catch (Exception e)
{
throw new TransformerException(this, e);
}
}