public class SimpleMixInResolver extends java.lang.Object implements ClassIntrospector.MixInResolver, java.io.Serializable
ClassIntrospector.MixInResolver
that just uses a Map
for 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).
Constructor and Description |
---|
SimpleMixInResolver(ClassIntrospector.MixInResolver overrides) |
Modifier and Type | Method and Description |
---|---|
void |
addLocalDefinition(java.lang.Class<?> target,
java.lang.Class<?> mixinSource) |
SimpleMixInResolver |
copy()
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. |
java.lang.Class<?> |
findMixInClassFor(java.lang.Class<?> cls)
Method that will check if there are "mix-in" classes (with mix-in
annotations) for given class
|
int |
localSize() |
void |
setLocalDefinitions(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> sourceMixins) |
SimpleMixInResolver |
withoutLocalDefinitions()
Mutant factory method that constructs a new instance that has no locally
defined mix-in/target mappings.
|
SimpleMixInResolver |
withOverrides(ClassIntrospector.MixInResolver overrides)
Mutant factory for constructor a new resolver instance with given
mix-in resolver override.
|
public SimpleMixInResolver(ClassIntrospector.MixInResolver overrides)
public SimpleMixInResolver withOverrides(ClassIntrospector.MixInResolver overrides)
public SimpleMixInResolver withoutLocalDefinitions()
public void setLocalDefinitions(java.util.Map<java.lang.Class<?>,java.lang.Class<?>> sourceMixins)
public void addLocalDefinition(java.lang.Class<?> target, java.lang.Class<?> mixinSource)
public SimpleMixInResolver copy()
ClassIntrospector.MixInResolver
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`.copy
in interface ClassIntrospector.MixInResolver
public java.lang.Class<?> findMixInClassFor(java.lang.Class<?> cls)
ClassIntrospector.MixInResolver
findMixInClassFor
in interface ClassIntrospector.MixInResolver
public int localSize()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"