Class SpringHandlerInstantiator
java.lang.Object
com.fasterxml.jackson.databind.cfg.HandlerInstantiator
org.springframework.http.converter.json.SpringHandlerInstantiator
Allows for creating Jackson (
JsonSerializer
, JsonDeserializer
,
KeyDeserializer
, TypeResolverBuilder
, TypeIdResolver
)
beans with autowiring against a Spring ApplicationContext
.
As of Spring 4.3, this overrides all factory methods in HandlerInstantiator
,
including non-abstract ones and recently introduced ones from Jackson 2.4 and 2.5:
for ValueInstantiator
, ObjectIdGenerator
, ObjectIdResolver
,
PropertyNamingStrategy
, Converter
, VirtualBeanPropertyWriter
.
- Since:
- 4.1.3
- Author:
- Sebastien Deleuze, Juergen Hoeller
- See Also:
-
Constructor Summary
ConstructorDescriptionSpringHandlerInstantiator
(AutowireCapableBeanFactory beanFactory) Create a new SpringHandlerInstantiator for the given BeanFactory. -
Method Summary
Modifier and TypeMethodDescriptionConverter<?,
?> converterInstance
(MapperConfig<?> config, Annotated annotated, Class<?> implClass) deserializerInstance
(DeserializationConfig config, Annotated annotated, Class<?> implClass) keyDeserializerInstance
(DeserializationConfig config, Annotated annotated, Class<?> implClass) namingStrategyInstance
(MapperConfig<?> config, Annotated annotated, Class<?> implClass) com.fasterxml.jackson.annotation.ObjectIdGenerator<?>
objectIdGeneratorInstance
(MapperConfig<?> config, Annotated annotated, Class<?> implClass) com.fasterxml.jackson.annotation.ObjectIdResolver
resolverIdGeneratorInstance
(MapperConfig<?> config, Annotated annotated, Class<?> implClass) serializerInstance
(SerializationConfig config, Annotated annotated, Class<?> implClass) typeIdResolverInstance
(MapperConfig<?> config, Annotated annotated, Class<?> implClass) typeResolverBuilderInstance
(MapperConfig<?> config, Annotated annotated, Class<?> implClass) valueInstantiatorInstance
(MapperConfig<?> config, Annotated annotated, Class<?> implClass) virtualPropertyWriterInstance
(MapperConfig<?> config, Class<?> implClass) Methods inherited from class com.fasterxml.jackson.databind.cfg.HandlerInstantiator
includeFilterInstance
-
Constructor Details
-
SpringHandlerInstantiator
Create a new SpringHandlerInstantiator for the given BeanFactory.- Parameters:
beanFactory
- the target BeanFactory
-
-
Method Details
-
deserializerInstance
public JsonDeserializer<?> deserializerInstance(DeserializationConfig config, Annotated annotated, Class<?> implClass) - Specified by:
deserializerInstance
in classHandlerInstantiator
-
keyDeserializerInstance
public KeyDeserializer keyDeserializerInstance(DeserializationConfig config, Annotated annotated, Class<?> implClass) - Specified by:
keyDeserializerInstance
in classHandlerInstantiator
-
serializerInstance
public JsonSerializer<?> serializerInstance(SerializationConfig config, Annotated annotated, Class<?> implClass) - Specified by:
serializerInstance
in classHandlerInstantiator
-
typeResolverBuilderInstance
public TypeResolverBuilder<?> typeResolverBuilderInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass) - Specified by:
typeResolverBuilderInstance
in classHandlerInstantiator
-
typeIdResolverInstance
public TypeIdResolver typeIdResolverInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass) - Specified by:
typeIdResolverInstance
in classHandlerInstantiator
-
valueInstantiatorInstance
public ValueInstantiator valueInstantiatorInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass) - Overrides:
valueInstantiatorInstance
in classHandlerInstantiator
- Since:
- 4.3
-
objectIdGeneratorInstance
public com.fasterxml.jackson.annotation.ObjectIdGenerator<?> objectIdGeneratorInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass) - Overrides:
objectIdGeneratorInstance
in classHandlerInstantiator
- Since:
- 4.3
-
resolverIdGeneratorInstance
public com.fasterxml.jackson.annotation.ObjectIdResolver resolverIdGeneratorInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass) - Overrides:
resolverIdGeneratorInstance
in classHandlerInstantiator
- Since:
- 4.3
-
namingStrategyInstance
public PropertyNamingStrategy namingStrategyInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass) - Overrides:
namingStrategyInstance
in classHandlerInstantiator
- Since:
- 4.3
-
converterInstance
public Converter<?,?> converterInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass) - Overrides:
converterInstance
in classHandlerInstantiator
- Since:
- 4.3
-
virtualPropertyWriterInstance
public VirtualBeanPropertyWriter virtualPropertyWriterInstance(MapperConfig<?> config, Class<?> implClass) - Overrides:
virtualPropertyWriterInstance
in classHandlerInstantiator
- Since:
- 4.3
-