public class SpringHandlerInstantiator extends HandlerInstantiator
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
.
Jackson2ObjectMapperBuilder.handlerInstantiator(HandlerInstantiator)
,
ApplicationContext.getAutowireCapableBeanFactory()
,
HandlerInstantiator
Constructor and Description |
---|
SpringHandlerInstantiator(AutowireCapableBeanFactory beanFactory)
Create a new SpringHandlerInstantiator for the given BeanFactory.
|
includeFilterInstance
public SpringHandlerInstantiator(AutowireCapableBeanFactory beanFactory)
beanFactory
- the target BeanFactorypublic JsonDeserializer<?> deserializerInstance(DeserializationConfig config, Annotated annotated, Class<?> implClass)
deserializerInstance
in class HandlerInstantiator
public KeyDeserializer keyDeserializerInstance(DeserializationConfig config, Annotated annotated, Class<?> implClass)
keyDeserializerInstance
in class HandlerInstantiator
public JsonSerializer<?> serializerInstance(SerializationConfig config, Annotated annotated, Class<?> implClass)
serializerInstance
in class HandlerInstantiator
public TypeResolverBuilder<?> typeResolverBuilderInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass)
typeResolverBuilderInstance
in class HandlerInstantiator
public TypeIdResolver typeIdResolverInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass)
typeIdResolverInstance
in class HandlerInstantiator
public ValueInstantiator valueInstantiatorInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass)
valueInstantiatorInstance
in class HandlerInstantiator
public com.fasterxml.jackson.annotation.ObjectIdGenerator<?> objectIdGeneratorInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass)
objectIdGeneratorInstance
in class HandlerInstantiator
public com.fasterxml.jackson.annotation.ObjectIdResolver resolverIdGeneratorInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass)
resolverIdGeneratorInstance
in class HandlerInstantiator
public PropertyNamingStrategy namingStrategyInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass)
namingStrategyInstance
in class HandlerInstantiator
public Converter<?,?> converterInstance(MapperConfig<?> config, Annotated annotated, Class<?> implClass)
converterInstance
in class HandlerInstantiator
public VirtualBeanPropertyWriter virtualPropertyWriterInstance(MapperConfig<?> config, Class<?> implClass)
virtualPropertyWriterInstance
in class HandlerInstantiator