Interface MixInResolver

All Superinterfaces:
Snapshottable<MixInResolver>
All Known Implementing Classes:
DeserializationConfig, MapperConfig, MapperConfigBase, MixInHandler, SerializationConfig

public interface MixInResolver extends Snapshottable<MixInResolver>
Interface used for decoupling details of how mix-in annotation definitions are accessed (via this interface), and how they are stored (defined by classes that implement the interface)
Since:
3.0 (in 2.x was nested type of ClassIntrospector)
  • Method Summary

    Modifier and Type
    Method
    Description
    Method that will check if there are "mix-in" classes (with mix-in annotations) for given class
    boolean
    Method that may be called for optimization purposes, to see if calls to mix-in resolver may be avoided.
    Method called to create a new, non-shared copy, to be used by different ObjectMapper instance, and one that should not be connected to this instance, if resolver has mutable state.
  • Method Details

    • findMixInClassFor

      Class<?> findMixInClassFor(Class<?> cls)
      Method that will check if there are "mix-in" classes (with mix-in annotations) for given class
    • hasMixIns

      boolean hasMixIns()
      Method that may be called for optimization purposes, to see if calls to mix-in resolver may be avoided. Return value of true means that it is possible that a mix-in class will be found; false that no mix-in will ever be found. In latter case caller can avoid calls altogether.

      Note that the reason for "empty" resolvers is to use "null object" for simplifying calling code.

      Returns:
      True, if this resolver MAY have mix-ins to apply; false if not (it is "empty")
    • snapshot

      MixInResolver snapshot()
      Method called to create a new, non-shared copy, to be used by different ObjectMapper instance, and one that should not be connected to this instance, if resolver has mutable state. If resolver is immutable may simply return `this`.
      Specified by:
      snapshot in interface Snapshottable<MixInResolver>