SettableBeanProperty[] creatorProps = _valueInstantiator.getFromObjectArguments(ctxt.getConfig());
_propertyBasedCreator = PropertyBasedCreator.construct(ctxt, _valueInstantiator, creatorProps);
// also: need to try to resolve 'external' type ids...
for (SettableBeanProperty prop : _propertyBasedCreator.properties()) {
if (prop.hasValueTypeDeserializer()) {
TypeDeserializer typeDeser = prop.getValueTypeDeserializer();
if (typeDeser.getTypeInclusion() == JsonTypeInfo.As.EXTERNAL_PROPERTY) {
if (extTypes == null) {
extTypes = new ExternalTypeHandler.Builder();
}
extTypes.addExternal(prop, typeDeser);
}
}
}
}
UnwrappedPropertyHandler unwrapped = null;
for (SettableBeanProperty origProp : _beanProperties) {
SettableBeanProperty prop = origProp;
// May already have deserializer from annotations, if so, skip:
if (!prop.hasValueDeserializer()) {
// [Issue#125]: allow use of converters
JsonDeserializer<?> deser = findConvertingDeserializer(ctxt, prop);
if (deser == null) {
deser = findDeserializer(ctxt, prop.getType(), prop);
}
prop = prop.withValueDeserializer(deser);
} else { // may need contextual version
JsonDeserializer<Object> deser = prop.getValueDeserializer();
/* Important! This is the only place where actually handle "primary"
* property deserializers -- call is different from other places.
*/
JsonDeserializer<?> cd = ctxt.handlePrimaryContextualization(deser, prop);
if (cd != deser) {
prop = prop.withValueDeserializer(cd);
}
}
// [JACKSON-235]: need to link managed references with matching back references
prop = _resolveManagedReferenceProperty(ctxt, prop);
// [JACKSON-132]: support unwrapped values (via @JsonUnwrapped)
SettableBeanProperty u = _resolveUnwrappedProperty(ctxt, prop);
if (u != null) {
prop = u;
if (unwrapped == null) {
unwrapped = new UnwrappedPropertyHandler();
}
unwrapped.addProperty(prop);
continue;
}
// [JACKSON-594]: non-static inner classes too:
prop = _resolveInnerClassValuedProperty(ctxt, prop);
if (prop != origProp) {
_beanProperties.replace(prop);
}
/* one more thing: if this property uses "external property" type inclusion
* (see [JACKSON-453]), it needs different handling altogether
*/
if (prop.hasValueTypeDeserializer()) {
TypeDeserializer typeDeser = prop.getValueTypeDeserializer();
if (typeDeser.getTypeInclusion() == JsonTypeInfo.As.EXTERNAL_PROPERTY) {
if (extTypes == null) {
extTypes = new ExternalTypeHandler.Builder();
}
extTypes.addExternal(prop, typeDeser);
// In fact, remove from list of known properties to simplify later handling