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

    Constructors
    Constructor
    Description
    CosIdJacksonModule(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 Type
    Method
    Description
     
    void
    setupModule(tools.jackson.databind.JacksonModule.SetupContext context)
     
    tools.jackson.core.Version
     

    Methods inherited from class tools.jackson.databind.JacksonModule

    getDependencies, getRegistrationId

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CosIdJacksonModule

      public CosIdJacksonModule(me.ahoo.cosid.runtime.CosIdRuntime runtime)
      A module of a runtime's generators.
      Parameters:
      runtime - the runtime
    • CosIdJacksonModule

      public CosIdJacksonModule(Function<String,me.ahoo.cosid.codec.IdCodec> generators)
      A module of codecs by generator name.
      Parameters:
      generators - the codec of a generator name; throws for an unknown one
  • Method Details

    • getModuleName

      public String getModuleName()
      Specified by:
      getModuleName in class tools.jackson.databind.JacksonModule
    • version

      public tools.jackson.core.Version version()
      Specified by:
      version in interface tools.jackson.core.Versioned
      Specified by:
      version in class tools.jackson.databind.JacksonModule
    • setupModule

      public void setupModule(tools.jackson.databind.JacksonModule.SetupContext context)
      Specified by:
      setupModule in class tools.jackson.databind.JacksonModule