private void convertPropertyRef(Bean source, Map<String, Object> values, Map<BeanId, Object> instanceCache) { for (SchemaPropertyRef prop : source.getSchema().get(SchemaPropertyRef.class)) { BeanId id = source.getFirstReference(prop.getName()); if (id == null) { continue; } Bean ref = id.getBean(); if (ref == null) { continue; } Schema refSchema = ref.getSchema(); if (refSchema == null) { throw Events.CFG101_SCHEMA_NOT_EXIST(ref.getId().getSchemaName()); } SchemaPropertyRef schemaRef = source.getSchema().get(SchemaPropertyRef.class, prop.getName()); Object beanInstance = instanceCache.get(id); if (beanInstance == null) { try { beanInstance = newInstance(loadClass(refSchema.getType())); } catch (Exception e) { throw new UnsupportedOperationException(e); } beanInstance = convert(ref, beanInstance, new HashMap<String, Object>(), instanceCache); } values.put(schemaRef.getFieldName(), beanInstance); } }