1 package com.fasterxml.jackson.databind.ser; 2 3 import com.fasterxml.jackson.databind.*; 4 5 /** 6 * Interface used to indicate serializers that want to do post-processing 7 * after construction and being added to {@link SerializerProvider}, 8 * but before being used. This is typically used to resolve references 9 * to other contained types; for example, bean serializers use this 10 * to eagerly find serializers for contained field types. 11 *<p> 12 * Note that in cases where serializer needs both contextualization and 13 * resolution -- that is, implements both this interface and {@link ContextualSerializer} 14 * -- resolution via this interface occurs first, and contextual 15 * resolution (using {@link ContextualSerializer}) later on. 16 */ 17 public interface ResolvableSerializer 18 { 19 /** 20 * Method called after {@link SerializerProvider} has registered 21 * the serializer, but before it has returned it to the caller. 22 * Called object can then resolve its dependencies to other types, 23 * including self-references (direct or indirect). 24 *<p> 25 * Note that this method does NOT return serializer, since resolution 26 * is not allowed to change actual serializer to use. 27 * 28 * @param provider Provider that has constructed serializer this method 29 * is called on. 30 */ resolve(SerializerProvider provider)31 public abstract void resolve(SerializerProvider provider) 32 throws JsonMappingException; 33 } 34