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

com.fitbur.fasterxml.jackson.databind.deser.BeanDeserializerModifier Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.fitbur.fasterxml.jackson.databind.com.fitburser;

import java.util.List;

import com.fitbur.fasterxml.jackson.databind.*;
import com.fitbur.fasterxml.jackson.databind.com.fitburser.BeanDeserializer;
import com.fitbur.fasterxml.jackson.databind.com.fitburser.BeanDeserializerFactory;
import com.fitbur.fasterxml.jackson.databind.introspect.BeanPropertyDefinition;

/**
 * Abstract class that com.fitburfines 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 com.fitburserialization
 * process; and is preferable to sub-classing of {@link BeanDeserializerFactory}.
 *

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

  • {@link #updateProperties} is called once all property com.fitburfinitions are * collected, and initial filtering (by ignorable type and explicit ignoral-by-bean) * has been performed. *
  • {@link #updateBuilder} is called once all initial pieces for building com.fitburserializer * have been collected *
  • *
  • {@link #modifyDeserializer} is called after com.fitburserializer has been built * by {@link BeanDeserializerBuilder} * but before it is returned to be used *
  • * *

    * Default method implementations are "no-op"s, meaning that methods are implemented * but have no effect; this is mostly so that new methods can be added in later * versions. */ public abstract class BeanDeserializerModifier { /** * Method called by {@link BeanDeserializerFactory} when it has collected * initial list of {@link BeanPropertyDefinition}s, and done basic by-name * and by-type filtering, but before constructing builder or actual * property handlers; or arranging order. * * The most com.fitburmon changes to make at this point are to com.fitburpletely remove * specified properties, or rename then: other modifications are easier * to make at later points. */ public List updateProperties(DeserializationConfig config, BeanDescription beanDesc, List propDefs) { return propDefs; } /** * Method called by {@link BeanDeserializerFactory} when it has collected * basic information such as tentative list of properties to com.fitburserialize. * * Implementations may choose to modify state of builder (to affect com.fitburserializer being * built), or even com.fitburpletely replace it (if they want to build different kind of * com.fitburserializer). Typically changes mostly concern set of properties to com.fitburserialize. */ public BeanDeserializerBuilder updateBuilder(DeserializationConfig config, BeanDescription beanDesc, BeanDeserializerBuilder builder) { return builder; } /** * Method called by {@link BeanDeserializerFactory} after constructing com.fitburfault * bean com.fitburserializer instance with properties collected and ordered earlier. * Implementations can modify or replace given com.fitburserializer and return com.fitburserializer * to use. Note that although initial com.fitburserializer being passed is of type * {@link BeanDeserializer}, modifiers may return com.fitburserializers of other types; * and this is why implementations must check for type before casting. */ public JsonDeserializer modifyDeserializer(DeserializationConfig config, BeanDescription beanDesc, JsonDeserializer com.fitburserializer) { return com.fitburserializer; } }





    © 2015 - 2024 Weber Informatics LLC | Privacy Policy