com.fasterxml.jackson.databind.deser.SettableBeanProperty#getValueDeserializer ( )源码实例Demo

下面列出了com.fasterxml.jackson.databind.deser.SettableBeanProperty#getValueDeserializer ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: lams   文件: BeanPropertyMap.java
protected SettableBeanProperty _rename(SettableBeanProperty prop, NameTransformer xf)
{
    if (prop == null) {
        return prop;
    }
    String newName = xf.transform(prop.getName());
    prop = prop.withSimpleName(newName);
    JsonDeserializer<?> deser = prop.getValueDeserializer();
    if (deser != null) {
        @SuppressWarnings("unchecked")
        JsonDeserializer<Object> newDeser = (JsonDeserializer<Object>)
            deser.unwrappingDeserializer(xf);
        if (newDeser != deser) {
            prop = prop.withValueDeserializer(newDeser);
        }
    }
    return prop;
}
 
源代码2 项目: lams   文件: PropertyValueBuffer.java
protected Object _findMissing(SettableBeanProperty prop) throws JsonMappingException
{
    // First: do we have injectable value?
    Object injectableValueId = prop.getInjectableValueId();
    if (injectableValueId != null) {
        return _context.findInjectableValue(prop.getInjectableValueId(),
                prop, null);
    }
    // Second: required?
    if (prop.isRequired()) {
        _context.reportInputMismatch(prop, "Missing required creator property '%s' (index %d)",
                prop.getName(), prop.getCreatorIndex());
    }
    if (_context.isEnabled(DeserializationFeature.FAIL_ON_MISSING_CREATOR_PROPERTIES)) {
        _context.reportInputMismatch(prop,
                "Missing creator property '%s' (index %d); `DeserializationFeature.FAIL_ON_MISSING_CREATOR_PROPERTIES` enabled",
                prop.getName(), prop.getCreatorIndex());
    }
    // Third: default value
    JsonDeserializer<Object> deser = prop.getValueDeserializer();
    return deser.getNullValue(_context);
}
 
源代码3 项目: lams   文件: UnwrappedPropertyHandler.java
public UnwrappedPropertyHandler renameAll(NameTransformer transformer)
{
    ArrayList<SettableBeanProperty> newProps = new ArrayList<SettableBeanProperty>(_properties.size());
    for (SettableBeanProperty prop : _properties) {
        String newName = transformer.transform(prop.getName());
        prop = prop.withSimpleName(newName);
        JsonDeserializer<?> deser = prop.getValueDeserializer();
        if (deser != null) {
            @SuppressWarnings("unchecked")
            JsonDeserializer<Object> newDeser = (JsonDeserializer<Object>)
                deser.unwrappingDeserializer(transformer);
            if (newDeser != deser) {
                prop = prop.withValueDeserializer(newDeser);
            }
        }
        newProps.add(prop);
    }
    return new UnwrappedPropertyHandler(newProps);
}