if (!_properties[i].hasDefaultType()) {
throw ctxt.mappingException("Missing external type id property '"+_properties[i].getTypePropertyName()+"'");
}
typeId = _properties[i].getDefaultTypeId();
} else if (_tokens[i] == null) {
SettableBeanProperty prop = _properties[i].getProperty();
throw ctxt.mappingException("Missing property '"+prop.getName()+"' for external type id '"+_properties[i].getTypePropertyName());
}
values[i] = _deserialize(jp, ctxt, i, typeId);
}
// second: fill in creator properties:
for (int i = 0; i < len; ++i) {
SettableBeanProperty prop = _properties[i].getProperty();
if (creator.findCreatorProperty(prop.getName()) != null) {
buffer.assignParameter(prop.getCreatorIndex(), values[i]);
}
}
Object bean = creator.build(ctxt, buffer);
// third: assign non-creator properties
for (int i = 0; i < len; ++i) {
SettableBeanProperty prop = _properties[i].getProperty();
if (creator.findCreatorProperty(prop.getName()) == null) {
prop.set(bean, values[i]);
}
}
return bean;
}