private final boolean _handleTypePropertyValue(JsonParser p, DeserializationContext ctxt, String propName, Object bean, String typeId, int index) throws IOException { ExtTypedProperty prop = _properties[index]; if (!prop.hasTypePropertyName(propName)) { // when could/should this ever happen? return false; } // note: can NOT skip child values (should always be String anyway) boolean canDeserialize = (bean != null) && (_tokens[index] != null); // Minor optimization: deserialize properties as soon as we have all we need: if (canDeserialize) { _deserializeAndSet(p, ctxt, bean, index, typeId); // clear stored data, to avoid deserializing+setting twice: _tokens[index] = null; } else { _typeIds[index] = typeId; } return true; }
_deserializeAndSet(p, ctxt, bean, index, typeId); _tokens[index] = null;
_deserializeAndSet(p, ctxt, bean, i, typeId);
private final boolean _handleTypePropertyValue(JsonParser p, DeserializationContext ctxt, String propName, Object bean, String typeId, int index) throws IOException { ExtTypedProperty prop = _properties[index]; if (!prop.hasTypePropertyName(propName)) { // when could/should this ever happen? return false; } // note: can NOT skip child values (should always be String anyway) boolean canDeserialize = (bean != null) && (_tokens[index] != null); // Minor optimization: deserialize properties as soon as we have all we need: if (canDeserialize) { _deserializeAndSet(p, ctxt, bean, index, typeId); // clear stored data, to avoid deserializing+setting twice: _tokens[index] = null; } else { _typeIds[index] = typeId; } return true; }
_deserializeAndSet(jp, ctxt, bean, index);
_deserializeAndSet(jp, ctxt, bean, index);
_deserializeAndSet(p, ctxt, bean, index, typeId);
_deserializeAndSet(jp, ctxt, bean, index, typeId);
_deserializeAndSet(jp, ctxt, bean, index, typeId);
_deserializeAndSet(jp, ctxt, bean, index);
_deserializeAndSet(jp, ctxt, bean, index);
_deserializeAndSet(jp, ctxt, bean, index, typeId); _tokens[index] = null;
_deserializeAndSet(jp, ctxt, bean, index, typeId); _tokens[index] = null;
_deserializeAndSet(p, ctxt, bean, index, typeId); _tokens[index] = null;
public Object complete(JsonParser jp, DeserializationContext ctxt, Object bean) throws IOException, JsonProcessingException { for (int i = 0, len = _properties.length; i < len; ++i) { if (_typeIds[i] == null) { // let's allow missing both type and property (may already have been set, too) if (_tokens[i] == null) { continue; } // but not just one throw ctxt.mappingException("Missing external type id property '"+_properties[i].getTypePropertyName()); } else if (_tokens[i] == null) { SettableBeanProperty prop = _properties[i].getProperty(); throw ctxt.mappingException("Missing property '"+prop.getName()+"' for external type id '"+_properties[i].getTypePropertyName()); } _deserializeAndSet(jp, ctxt, bean, i); } return bean; }
public Object complete(JsonParser jp, DeserializationContext ctxt, Object bean) throws IOException, JsonProcessingException { for (int i = 0, len = _properties.length; i < len; ++i) { if (_typeIds[i] == null) { // let's allow missing both type and property (may already have been set, too) if (_tokens[i] == null) { continue; } // but not just one throw ctxt.mappingException("Missing external type id property '"+_properties[i].getTypePropertyName()); } else if (_tokens[i] == null) { SettableBeanProperty prop = _properties[i].getProperty(); throw ctxt.mappingException("Missing property '"+prop.getName()+"' for external type id '"+_properties[i].getTypePropertyName()); } _deserializeAndSet(jp, ctxt, bean, i); } return bean; }
_deserializeAndSet(p, ctxt, bean, i, typeId);
throw ctxt.mappingException("Missing property '"+prop.getName()+"' for external type id '"+_properties[i].getTypePropertyName()); _deserializeAndSet(jp, ctxt, bean, i, typeId);
throw ctxt.mappingException("Missing property '"+prop.getName()+"' for external type id '"+_properties[i].getTypePropertyName()); _deserializeAndSet(jp, ctxt, bean, i, typeId);
_deserializeAndSet(p, ctxt, bean, i, typeId);