/* */
/* */ public CompositeValue createCompositeValue(CompositeMetaType type, Object value, Map<Object, MetaValue> mapping)
/* */ {
/* 394 */ if (value == null) {
/* 395 */ return null;
/* 397 */ }CompositeValueSupport result = new CompositeValueSupport(type);
/* 398 */ mapping.put(value, result);
/* */ BeanInfo beanInfo;
/* */ try {
/* 403 */ ClassLoader cl = value.getClass().getClassLoader();
/* */ BeanInfo beanInfo;
/* 404 */ if (cl == null)
/* 405 */ beanInfo = configuration.getBeanInfo(value.getClass());
/* */ else
/* 407 */ beanInfo = configuration.getBeanInfo(type.getTypeName(), cl);
/* */ }
/* */ catch (Exception e)
/* */ {
/* 411 */ throw new RuntimeException("Error retrieving BeanInfo for " + type);
/* */ }
/* */
/* 414 */ for (String name : type.keySet()) {
/* 416 */ MetaType itemType = type.getType(name);
/* */ Object itemValue;
/* */ try {
/* 420 */ itemValue = beanInfo.getProperty(value, name);
/* */ }
/* */ catch (RuntimeException e)
/* */ {
/* 424 */ throw e;
/* */ }
/* */ catch (Error e)
/* */ {
/* 428 */ throw e;
/* */ }
/* */ catch (Throwable t)
/* */ {
/* 432 */ throw new RuntimeException("Error getting property: " + name + " for " + value.getClass(), t);
/* */ }
/* */
/* 435 */ MetaValue item = internalCreate(itemValue, null, itemType);
/* 436 */ result.set(name, item);
/* */ }
/* */
/* 439 */ return result;
/* */ }