All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.codehaus.jackson.map.deser.BeanDeserializerModifier Maven / Gradle / Ivy

Go to download

Data Mapper package is a high-performance data binding package built on Jackson JSON processor

There is a newer version: 1.9.13
Show newest version
package org.codehaus.jackson.map.deser;

import org.codehaus.jackson.map.DeserializationConfig;
import org.codehaus.jackson.map.JsonDeserializer;
import org.codehaus.jackson.map.deser.BeanDeserializer;
import org.codehaus.jackson.map.deser.BeanDeserializerFactory;
import org.codehaus.jackson.map.introspect.BasicBeanDescription;

/**
 * Abstract class that defines API for objects that can be registered (for {@link BeanDeserializerFactory}
 * to participate in constructing {@link BeanDeserializer} instances.
 * This is typically done by modules that want alter some aspects of deserialization
 * process; and is preferable to sub-classing of {@link BeanDeserializerFactory}.
 *

* Sequence in which callback methods are called is as follows: *

    *
*

* Default method implementations are "no-op"s, meaning that methods are implemented * but have no effect. * * @since 1.7 */ public abstract class BeanDeserializerModifier { /** * Method called by {@link BeanDeserializerFactory} when it has collected * basic information such as tentative list of properties to deserializer. * * Implementations may choose to modify state of builder (to affect deserializer being * built), or even completely replace it (if they want to build different kind of * deserializer). Typically changes mostly concern set of properties to deserialize. */ public BeanDeserializerBuilder updateBuilder(DeserializationConfig config, BasicBeanDescription beanDesc, BeanDeserializerBuilder builder) { return builder; } /** * Method called by {@link BeanDeserializerFactory} after constructing default * bean deserializer instance with properties collected and ordered earlier. * Implementations can modify or replace given deserializer and return deserializer * to use. Note that although initial deserializer being passed is of type * {@link BeanDeserializer}, modifiers may return deserializers of other types; * and this is why implementations must check for type before casting. */ public JsonDeserializer modifyDeserializer(DeserializationConfig config, BasicBeanDescription beanDesc, JsonDeserializer deserializer) { return deserializer; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy