|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.map.Module
org.codehaus.jackson.map.module.SimpleModule
public class SimpleModule
Simple Module
implementation that allows registration
of serializers and deserializers, and bean serializer
and deserializer modifiers.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.codehaus.jackson.map.Module |
---|
Module.SetupContext |
Field Summary | |
---|---|
protected SimpleAbstractTypeResolver |
_abstractTypes
Lazily-constructed resolver used for storing mappings from abstract classes to more specific implementing classes (which may be abstract or concrete) |
protected SimpleDeserializers |
_deserializers
|
protected SimpleKeyDeserializers |
_keyDeserializers
|
protected SimpleSerializers |
_keySerializers
|
protected String |
_name
|
protected SimpleSerializers |
_serializers
|
protected Version |
_version
|
Constructor Summary | |
---|---|
SimpleModule(String name,
Version version)
|
Method Summary | ||
---|---|---|
|
addAbstractTypeMapping(Class<T> superType,
Class<? extends T> subType)
Lazily-constructed resolver used for storing mappings from abstract classes to more specific implementing classes (which may be abstract or concrete) |
|
|
addDeserializer(Class<T> type,
JsonDeserializer<? extends T> deser)
|
|
SimpleModule |
addKeyDeserializer(Class<?> type,
KeyDeserializer deser)
|
|
|
addKeySerializer(Class<? extends T> type,
JsonSerializer<T> ser)
|
|
|
addSerializer(Class<? extends T> type,
JsonSerializer<T> ser)
|
|
SimpleModule |
addSerializer(JsonSerializer<?> ser)
|
|
String |
getModuleName()
Method that returns identifier for module; this can be used by Jackson for informational purposes, as well as in associating extensions with module that provides them. |
|
void |
setupModule(Module.SetupContext context)
Method called by ObjectMapper when module is registered. |
|
Version |
version()
Method that returns version of this module. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final String _name
protected final Version _version
protected SimpleSerializers _serializers
protected SimpleDeserializers _deserializers
protected SimpleSerializers _keySerializers
protected SimpleKeyDeserializers _keyDeserializers
protected SimpleAbstractTypeResolver _abstractTypes
Constructor Detail |
---|
public SimpleModule(String name, Version version)
Method Detail |
---|
public SimpleModule addSerializer(JsonSerializer<?> ser)
public <T> SimpleModule addSerializer(Class<? extends T> type, JsonSerializer<T> ser)
public <T> SimpleModule addKeySerializer(Class<? extends T> type, JsonSerializer<T> ser)
public <T> SimpleModule addDeserializer(Class<T> type, JsonDeserializer<? extends T> deser)
public SimpleModule addKeyDeserializer(Class<?> type, KeyDeserializer deser)
public <T> SimpleModule addAbstractTypeMapping(Class<T> superType, Class<? extends T> subType)
public String getModuleName()
Module
getModuleName
in class Module
public void setupModule(Module.SetupContext context)
Module
ObjectMapper
when module is registered.
It is called to let module register functionality it provides,
using callback methods passed-in context object exposes.
setupModule
in class Module
public Version version()
Module
version
in interface Versioned
version
in class Module
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |