Package org.codehaus.jackson.map.module
Class SimpleValueInstantiators
java.lang.Object
org.codehaus.jackson.map.deser.ValueInstantiators.Base
org.codehaus.jackson.map.module.SimpleValueInstantiators
- All Implemented Interfaces:
ValueInstantiators
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.codehaus.jackson.map.deser.ValueInstantiators
ValueInstantiators.Base
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected HashMap
<ClassKey, ValueInstantiator> Mappings from raw (type-erased, i.e. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddValueInstantiator
(Class<?> forType, ValueInstantiator inst) findValueInstantiator
(DeserializationConfig config, BeanDescription beanDesc, ValueInstantiator defaultInstantiator) Method called to find theValueInstantiator
to use for creating instances of specified type during deserialization.
-
Field Details
-
_classMappings
Mappings from raw (type-erased, i.e. non-generic) types to matchingValueInstantiator
instances.
-
-
Constructor Details
-
SimpleValueInstantiators
public SimpleValueInstantiators()
-
-
Method Details
-
addValueInstantiator
-
findValueInstantiator
public ValueInstantiator findValueInstantiator(DeserializationConfig config, BeanDescription beanDesc, ValueInstantiator defaultInstantiator) Description copied from interface:ValueInstantiators
Method called to find theValueInstantiator
to use for creating instances of specified type during deserialization. Note that a default value instantiator is always created first and passed; if an implementation does not want to modify or replace it, it has to return passed instance as is (returning null is an error)- Specified by:
findValueInstantiator
in interfaceValueInstantiators
- Overrides:
findValueInstantiator
in classValueInstantiators.Base
- Parameters:
config
- Deserialization configuration in usebeanDesc
- Additional information about POJO type to be instantiated: description will always be of typeBasicBeanDescription
(that is, safe to cast to this more specific type)defaultInstantiator
- Instantiator that will be used if no changes are made; passed to allow custom instances to use annotation-provided information (note, however, that earlierValueInstantiators
may have changed it to a custom instantiator already)- Returns:
- Instantiator to use; either
defaultInstantiator
that was passed, or a custom variant; can not be null.
-