com.fasterxml.jackson.databind.AbstractTypeResolver Java Examples

The following examples show how to use com.fasterxml.jackson.databind.AbstractTypeResolver. 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: DeserializerFactoryConfig.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Copy-constructor that will create an instance that contains defined
 * set of additional deserializer providers.
 */
protected DeserializerFactoryConfig(Deserializers[] allAdditionalDeserializers,
        KeyDeserializers[] allAdditionalKeyDeserializers,
        BeanDeserializerModifier[] modifiers,
        AbstractTypeResolver[] atr,
        ValueInstantiators[] vi)
{
    _additionalDeserializers = (allAdditionalDeserializers == null) ?
            NO_DESERIALIZERS : allAdditionalDeserializers;
    _additionalKeyDeserializers = (allAdditionalKeyDeserializers == null) ?
            DEFAULT_KEY_DESERIALIZERS : allAdditionalKeyDeserializers;
    _modifiers = (modifiers == null) ? NO_MODIFIERS : modifiers;
    _abstractTypeResolvers = (atr == null) ? NO_ABSTRACT_TYPE_RESOLVERS : atr;
    _valueInstantiators = (vi == null) ? NO_VALUE_INSTANTIATORS : vi;
}
 
Example #2
Source File: DeserializerFactoryConfig.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Fluent/factory method used to construct a configuration object that
 * has same configuration as this instance plus one additional
 * abstract type resolver.
 * Added resolver has the highest priority (that is, it
 * gets called before any already registered resolver).
 */
public DeserializerFactoryConfig withAbstractTypeResolver(AbstractTypeResolver resolver)
{
    if (resolver == null) {
        throw new IllegalArgumentException("Cannot pass null resolver");
    }
    AbstractTypeResolver[] all = ArrayBuilders.insertInListNoDup(_abstractTypeResolvers, resolver);
    return new DeserializerFactoryConfig(_additionalDeserializers, _additionalKeyDeserializers, _modifiers,
            all, _valueInstantiators);
}
 
Example #3
Source File: DeserializerFactoryConfig.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public Iterable<AbstractTypeResolver> abstractTypeResolvers() {
    return new ArrayIterator<AbstractTypeResolver>(_abstractTypeResolvers);
}