Class SimpleMixInResolver
- java.lang.Object
-
- com.fasterxml.jackson.databind.introspect.SimpleMixInResolver
-
- All Implemented Interfaces:
ClassIntrospector.MixInResolver,java.io.Serializable
public class SimpleMixInResolver extends java.lang.Object implements ClassIntrospector.MixInResolver, java.io.Serializable
Simple implementation ofClassIntrospector.MixInResolverthat just uses aMapfor containing mapping from target to mix-in classes.Implementation is only thread-safe after initialization (that is, when underlying Map is not modified but only read).
- Since:
- 2.6
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleMixInResolver(ClassIntrospector.MixInResolver overrides)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLocalDefinition(java.lang.Class<?> target, java.lang.Class<?> mixinSource)SimpleMixInResolvercopy()Method called to create a new, non-shared copy, to be used by differentObjectMapperinstance, and one that should not be connected to this instance, if resolver has mutable state.java.lang.Class<?>findMixInClassFor(java.lang.Class<?> cls)Method that will check if there are "mix-in" classes (with mix-in annotations) for given classintlocalSize()voidsetLocalDefinitions(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> sourceMixins)SimpleMixInResolverwithoutLocalDefinitions()Mutant factory method that constructs a new instance that has no locally defined mix-in/target mappings.SimpleMixInResolverwithOverrides(ClassIntrospector.MixInResolver overrides)Mutant factory for constructor a new resolver instance with given mix-in resolver override.
-
-
-
Constructor Detail
-
SimpleMixInResolver
public SimpleMixInResolver(ClassIntrospector.MixInResolver overrides)
-
-
Method Detail
-
withOverrides
public SimpleMixInResolver withOverrides(ClassIntrospector.MixInResolver overrides)
Mutant factory for constructor a new resolver instance with given mix-in resolver override.
-
withoutLocalDefinitions
public SimpleMixInResolver withoutLocalDefinitions()
Mutant factory method that constructs a new instance that has no locally defined mix-in/target mappings.
-
setLocalDefinitions
public void setLocalDefinitions(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> sourceMixins)
-
addLocalDefinition
public void addLocalDefinition(java.lang.Class<?> target, java.lang.Class<?> mixinSource)
-
copy
public SimpleMixInResolver copy()
Description copied from interface:ClassIntrospector.MixInResolverMethod called to create a new, non-shared copy, to be used by differentObjectMapperinstance, 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:
copyin interfaceClassIntrospector.MixInResolver
-
findMixInClassFor
public java.lang.Class<?> findMixInClassFor(java.lang.Class<?> cls)
Description copied from interface:ClassIntrospector.MixInResolverMethod that will check if there are "mix-in" classes (with mix-in annotations) for given class- Specified by:
findMixInClassForin interfaceClassIntrospector.MixInResolver
-
localSize
public int localSize()
-
-