Class ObjectMapperModule
- java.lang.Object
-
- com.fasterxml.jackson.module.guice.ObjectMapperModule
-
- All Implemented Interfaces:
com.google.inject.Module
public class ObjectMapperModule extends java.lang.Object implements com.google.inject.Module
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ObjectMapperModule.ObjectMapperProvider
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<com.fasterxml.jackson.databind.Module>
modulesToAdd
private java.util.List<com.google.inject.Key<? extends com.fasterxml.jackson.databind.Module>>
modulesToInject
private com.fasterxml.jackson.databind.ObjectMapper
objectMapper
private com.google.inject.Key<com.fasterxml.jackson.databind.ObjectMapper>
objectMapperKey
private java.lang.Class<? extends java.lang.annotation.Annotation>
scope
-
Constructor Summary
Constructors Constructor Description ObjectMapperModule()
ObjectMapperModule(com.google.inject.Key<com.fasterxml.jackson.databind.ObjectMapper> objectMapperKey)
ObjectMapperModule(java.lang.annotation.Annotation annotation)
ObjectMapperModule(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(com.google.inject.Binder binder)
ObjectMapperModule
in(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation)
ObjectMapperModule
registerModule(com.fasterxml.jackson.databind.Module module)
ObjectMapperModule
registerModule(com.google.inject.Key<? extends com.fasterxml.jackson.databind.Module> key)
ObjectMapperModule
registerModule(java.lang.Class<? extends com.fasterxml.jackson.databind.Module> clazz)
ObjectMapperModule
registerModule(java.lang.Class<? extends com.fasterxml.jackson.databind.Module> clazz, java.lang.annotation.Annotation annotation)
ObjectMapperModule
registerModule(java.lang.Class<? extends com.fasterxml.jackson.databind.Module> clazz, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
ObjectMapperModule
withObjectMapper(com.fasterxml.jackson.databind.ObjectMapper m)
-
-
-
Field Detail
-
modulesToAdd
private final java.util.List<com.fasterxml.jackson.databind.Module> modulesToAdd
-
modulesToInject
private final java.util.List<com.google.inject.Key<? extends com.fasterxml.jackson.databind.Module>> modulesToInject
-
objectMapperKey
private final com.google.inject.Key<com.fasterxml.jackson.databind.ObjectMapper> objectMapperKey
-
objectMapper
private com.fasterxml.jackson.databind.ObjectMapper objectMapper
-
scope
private java.lang.Class<? extends java.lang.annotation.Annotation> scope
-
-
Constructor Detail
-
ObjectMapperModule
public ObjectMapperModule()
-
ObjectMapperModule
public ObjectMapperModule(java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
-
ObjectMapperModule
public ObjectMapperModule(java.lang.annotation.Annotation annotation)
-
ObjectMapperModule
public ObjectMapperModule(com.google.inject.Key<com.fasterxml.jackson.databind.ObjectMapper> objectMapperKey)
-
-
Method Detail
-
in
public ObjectMapperModule in(java.lang.Class<? extends java.lang.annotation.Annotation> scopeAnnotation)
-
registerModule
public ObjectMapperModule registerModule(com.fasterxml.jackson.databind.Module module)
-
registerModule
public ObjectMapperModule registerModule(java.lang.Class<? extends com.fasterxml.jackson.databind.Module> clazz)
-
registerModule
public ObjectMapperModule registerModule(java.lang.Class<? extends com.fasterxml.jackson.databind.Module> clazz, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
-
registerModule
public ObjectMapperModule registerModule(java.lang.Class<? extends com.fasterxml.jackson.databind.Module> clazz, java.lang.annotation.Annotation annotation)
-
registerModule
public ObjectMapperModule registerModule(com.google.inject.Key<? extends com.fasterxml.jackson.databind.Module> key)
-
withObjectMapper
public ObjectMapperModule withObjectMapper(com.fasterxml.jackson.databind.ObjectMapper m)
- Parameters:
m
- ObjectMapper to use for newly constructed module- Since:
- 2.8
-
configure
public void configure(com.google.inject.Binder binder)
- Specified by:
configure
in interfacecom.google.inject.Module
-
-