Java Code Examples for com.fasterxml.jackson.databind.BeanDescription#getType()

The following examples show how to use com.fasterxml.jackson.databind.BeanDescription#getType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractTypeMaterializer.java    From jackson-modules-base with Apache License 2.0 6 votes vote down vote up
/**
 * Entry-point for {@link AbstractTypeResolver} that Jackson calls to materialize
 * an abstract type.
 */
@Override
public JavaType resolveAbstractType(DeserializationConfig config, BeanDescription beanDesc)
{
    final JavaType type = beanDesc.getType();
    if (!_suitableType(type)) {
        return null;
    }

    // might want to skip proxies, local types too... but let them be for now:
    //if (intr.findTypeResolver(beanDesc.getClassInfo(), type) == null) {
    Class<?> materializedType;
    
    if (type.hasGenericTypes()) {
        materializedType = materializeGenericType(config, type);
    } else {
        materializedType = materializeRawType(config, beanDesc.getClassInfo());
    }
    return config.constructType(materializedType);
}
 
Example 2
Source File: InvalidDefinitionException.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
protected InvalidDefinitionException(JsonParser p, String msg,
        BeanDescription bean, BeanPropertyDefinition prop) {
    super(p, msg);
    _type = (bean == null) ? null : bean.getType();
    _beanDesc = bean;
    _property = prop;
}
 
Example 3
Source File: InvalidDefinitionException.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
protected InvalidDefinitionException(JsonGenerator g, String msg,
        BeanDescription bean, BeanPropertyDefinition prop) {
    super(g, msg);
    _type = (bean == null) ? null : bean.getType();
    _beanDesc = bean;
    _property = prop;
}