Package me.ahoo.cosid.jackson
Class CosIdJacksonModule
java.lang.Object
tools.jackson.databind.JacksonModule
me.ahoo.cosid.jackson.CosIdJacksonModule
- All Implemented Interfaces:
tools.jackson.core.Versioned
public final class CosIdJacksonModule
extends tools.jackson.databind.JacksonModule
Binds
AsString.generator() to a runtime: @AsString(generator = "order") writes and reads with the codec
of the runtime's generator order. The inline codecs need no module. The Spring Boot auto-configuration
registers one for the context's runtime.-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.databind.JacksonModule
tools.jackson.databind.JacksonModule.SetupContext -
Constructor Summary
ConstructorsConstructorDescriptionCosIdJacksonModule(Function<String, me.ahoo.cosid.codec.IdCodec> generators) A module of codecs by generator name.CosIdJacksonModule(me.ahoo.cosid.runtime.CosIdRuntime runtime) A module of a runtime's generators. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetupModule(tools.jackson.databind.JacksonModule.SetupContext context) tools.jackson.core.Versionversion()Methods inherited from class tools.jackson.databind.JacksonModule
getDependencies, getRegistrationId
-
Constructor Details
-
CosIdJacksonModule
public CosIdJacksonModule(me.ahoo.cosid.runtime.CosIdRuntime runtime) A module of a runtime's generators.- Parameters:
runtime- the runtime
-
CosIdJacksonModule
A module of codecs by generator name.- Parameters:
generators- the codec of a generator name; throws for an unknown one
-
-
Method Details
-
getModuleName
- Specified by:
getModuleNamein classtools.jackson.databind.JacksonModule
-
version
public tools.jackson.core.Version version()- Specified by:
versionin interfacetools.jackson.core.Versioned- Specified by:
versionin classtools.jackson.databind.JacksonModule
-
setupModule
public void setupModule(tools.jackson.databind.JacksonModule.SetupContext context) - Specified by:
setupModulein classtools.jackson.databind.JacksonModule
-