Class JsonUtils.JacksonEnumMapping<T>
java.lang.Object
de.oktoflow.platform.support.json.jackson.JsonUtils.JacksonEnumMapping<T>
- Type Parameters:
T- the enumeration type to map
- All Implemented Interfaces:
de.iip_ecosphere.platform.support.json.Json.EnumMapping<T>
- Enclosing class:
JsonUtils
public static class JsonUtils.JacksonEnumMapping<T>
extends Object
implements de.iip_ecosphere.platform.support.json.Json.EnumMapping<T>
Specifies the mapping of an enumeration for serialization/deserialization.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJacksonEnumMapping(Class<T> type) Creates a mapping specification, with no mapping.Creates a mapping specification with mapping. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMapping(String name, T value) voidaddToModule(com.fasterxml.jackson.databind.module.SimpleModule module) Ass this mapping to the given module.getType()
-
Field Details
-
type
-
mapping
-
-
Constructor Details
-
JacksonEnumMapping
Creates a mapping specification, with no mapping.- Parameters:
type- the type to map
-
JacksonEnumMapping
Creates a mapping specification with mapping.- Parameters:
type- the type to mapmapping- the name-value mapping, may be null
-
-
Method Details
-
addMapping
- Specified by:
addMappingin interfacede.iip_ecosphere.platform.support.json.Json.EnumMapping<T>
-
getType
- Specified by:
getTypein interfacede.iip_ecosphere.platform.support.json.Json.EnumMapping<T>
-
addToModule
public void addToModule(com.fasterxml.jackson.databind.module.SimpleModule module) Ass this mapping to the given module.- Parameters:
module- the target module
-