Class DefaultObjectMapperFactory
- java.lang.Object
-
- de.agilecoders.wicket.jquery.settings.DefaultObjectMapperFactory
-
- All Implemented Interfaces:
ObjectMapperFactory
- Direct Known Subclasses:
SingletonObjectMapperFactory
public class DefaultObjectMapperFactory extends Object implements ObjectMapperFactory
ObjectMapperfactory- Author:
- Michael Haitz michael.haitz@agilecoders.de
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDefaultObjectMapperFactory.Holderlazy holder pattern to prevent instantiation of serializers if not used.
-
Constructor Summary
Constructors Constructor Description DefaultObjectMapperFactory()Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.fasterxml.jackson.databind.ModuleaddSerializer(com.fasterxml.jackson.databind.module.SimpleModule module)adds custom serializers to given moduleprotected com.fasterxml.jackson.databind.ObjectMapperconfigure(com.fasterxml.jackson.databind.ObjectMapper mapper)configures given object mapper instance.protected com.fasterxml.jackson.databind.ModulenewModule()com.fasterxml.jackson.databind.ObjectMappernewObjectMapper()
-
-
-
Method Detail
-
newObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper newObjectMapper()
- Specified by:
newObjectMapperin interfaceObjectMapperFactory- Returns:
- new object mapper instance
-
newModule
protected com.fasterxml.jackson.databind.Module newModule()
- Returns:
- new mapper module
-
addSerializer
protected com.fasterxml.jackson.databind.Module addSerializer(com.fasterxml.jackson.databind.module.SimpleModule module)
adds custom serializers to given module- Parameters:
module- the module to extend- Returns:
- module instance for chaining
-
configure
protected com.fasterxml.jackson.databind.ObjectMapper configure(com.fasterxml.jackson.databind.ObjectMapper mapper)
configures given object mapper instance.- Parameters:
mapper- the object to configure- Returns:
- mapper instance for chaining
-
-