Class JacksonBukkitModule

java.lang.Object
com.fasterxml.jackson.databind.Module
de.eldoria.jacksonbukkit.JacksonBukkitModule
All Implemented Interfaces:
Versioned
Direct Known Subclasses:
JacksonBukkit, JacksonPaper

@Internal public abstract class JacksonBukkitModule extends Module
Base class to implement a bukkit jackson module.
  • Field Details

    • hexColors

      protected final boolean hexColors
      True when colors should be interpreted as hex strings.
  • Constructor Details

    • JacksonBukkitModule

      public JacksonBukkitModule(boolean hexColors)
      Creates a new jackson bukkit module
      Parameters:
      hexColors - true to use hex colors
  • Method Details

    • getModuleName

      public abstract String getModuleName()
      Specified by:
      getModuleName in class Module
    • version

      public Version version()
      Specified by:
      version in interface Versioned
      Specified by:
      version in class Module
    • setupModule

      public void setupModule(Module.SetupContext context)
      Specified by:
      setupModule in class Module
    • addSerializer

      protected final void addSerializer(SimpleSerializers serializers)
      Add serializer to the serializers
      Parameters:
      serializers - serializers
    • registerSerializer

      protected abstract void registerSerializer(SimpleSerializers serializers)
      Register serializer of the inheriting class

      Will be called after default serializer were registered.

      Parameters:
      serializers - serializers
    • addDeserializer

      protected final void addDeserializer(SimpleDeserializers deserializers)
      Add deserializer to the deserializers
      Parameters:
      deserializers - deserializers
    • registerDeserializer

      protected abstract void registerDeserializer(SimpleDeserializers deserializers)
      Register deserializers of the inheriting class.

      Will be called after default deserializer were registered.

      Parameters:
      deserializers - deserializers