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.
|
Modifier and Type | Method and Description |
---|---|
Converter<?,?> |
converterInstance(MapperConfig<?> config,
Annotated annotated,
java.lang.Class<?> implClass) |
JsonDeserializer<?> |
deserializerInstance(DeserializationConfig config,
Annotated annotated,
java.lang.Class<?> implClass) |
KeyDeserializer |
keyDeserializerInstance(DeserializationConfig config,
Annotated annotated,
java.lang.Class<?> implClass) |
PropertyNamingStrategy |
namingStrategyInstance(MapperConfig<?> config,
Annotated annotated,
java.lang.Class<?> implClass) |
com.fasterxml.jackson.annotation.ObjectIdGenerator<?> |
objectIdGeneratorInstance(MapperConfig<?> config,
Annotated annotated,
java.lang.Class<?> implClass) |
com.fasterxml.jackson.annotation.ObjectIdResolver |
resolverIdGeneratorInstance(MapperConfig<?> config,
Annotated annotated,
java.lang.Class<?> implClass) |
JsonSerializer<?> |
serializerInstance(SerializationConfig config,
Annotated annotated,
java.lang.Class<?> implClass) |
TypeIdResolver |
typeIdResolverInstance(MapperConfig<?> config,
Annotated annotated,
java.lang.Class<?> implClass) |
TypeResolverBuilder<?> |
typeResolverBuilderInstance(MapperConfig<?> config,
Annotated annotated,
java.lang.Class<?> implClass) |
ValueInstantiator |
valueInstantiatorInstance(MapperConfig<?> config,
Annotated annotated,
java.lang.Class<?> implClass) |
VirtualBeanPropertyWriter |
virtualPropertyWriterInstance(MapperConfig<?> config,
java.lang.Class<?> implClass) |
includeFilterInstance
public SpringHandlerInstantiator(AutowireCapableBeanFactory beanFactory)
beanFactory
- the target BeanFactorypublic JsonDeserializer<?> deserializerInstance(DeserializationConfig config, Annotated annotated, java.lang.Class<?> implClass)
deserializerInstance
in class HandlerInstantiator
public KeyDeserializer keyDeserializerInstance(DeserializationConfig config, Annotated annotated, java.lang.Class<?> implClass)
keyDeserializerInstance
in class HandlerInstantiator
public JsonSerializer<?> serializerInstance(SerializationConfig config, Annotated annotated, java.lang.Class<?> implClass)
serializerInstance
in class HandlerInstantiator
public TypeResolverBuilder<?> typeResolverBuilderInstance(MapperConfig<?> config, Annotated annotated, java.lang.Class<?> implClass)
typeResolverBuilderInstance
in class HandlerInstantiator
public TypeIdResolver typeIdResolverInstance(MapperConfig<?> config, Annotated annotated, java.lang.Class<?> implClass)
typeIdResolverInstance
in class HandlerInstantiator
public ValueInstantiator valueInstantiatorInstance(MapperConfig<?> config, Annotated annotated, java.lang.Class<?> implClass)
valueInstantiatorInstance
in class HandlerInstantiator
public com.fasterxml.jackson.annotation.ObjectIdGenerator<?> objectIdGeneratorInstance(MapperConfig<?> config, Annotated annotated, java.lang.Class<?> implClass)
objectIdGeneratorInstance
in class HandlerInstantiator
public com.fasterxml.jackson.annotation.ObjectIdResolver resolverIdGeneratorInstance(MapperConfig<?> config, Annotated annotated, java.lang.Class<?> implClass)
resolverIdGeneratorInstance
in class HandlerInstantiator
public PropertyNamingStrategy namingStrategyInstance(MapperConfig<?> config, Annotated annotated, java.lang.Class<?> implClass)
namingStrategyInstance
in class HandlerInstantiator
public Converter<?,?> converterInstance(MapperConfig<?> config, Annotated annotated, java.lang.Class<?> implClass)
converterInstance
in class HandlerInstantiator
public VirtualBeanPropertyWriter virtualPropertyWriterInstance(MapperConfig<?> config, java.lang.Class<?> implClass)
virtualPropertyWriterInstance
in class HandlerInstantiator