Package de.eldoria.jacksonbukkit
Class JacksonBukkitModule
java.lang.Object
com.fasterxml.jackson.databind.Module
de.eldoria.jacksonbukkit.JacksonBukkitModule
- All Implemented Interfaces:
Versioned
- Direct Known Subclasses:
JacksonBukkit
,JacksonPaper
Base class to implement a bukkit jackson module.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.Module
Module.SetupContext
-
Field Summary
Modifier and TypeFieldDescriptionprotected final boolean
True when colors should be interpreted as hex strings. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final void
addDeserializer
(SimpleDeserializers deserializers) Add deserializer to the deserializersprotected final void
addSerializer
(SimpleSerializers serializers) Add serializer to the serializersabstract String
protected abstract void
registerDeserializer
(SimpleDeserializers deserializers) Register deserializers of the inheriting class.protected abstract void
registerSerializer
(SimpleSerializers serializers) Register serializer of the inheriting classvoid
setupModule
(Module.SetupContext context) version()
Methods inherited from class com.fasterxml.jackson.databind.Module
getDependencies, getTypeId
-
Field Details
-
hexColors
protected final boolean hexColorsTrue 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
- Specified by:
getModuleName
in classModule
-
version
-
setupModule
- Specified by:
setupModule
in classModule
-
addSerializer
Add serializer to the serializers- Parameters:
serializers
- serializers
-
registerSerializer
Register serializer of the inheriting classWill be called after default serializer were registered.
- Parameters:
serializers
- serializers
-
addDeserializer
Add deserializer to the deserializers- Parameters:
deserializers
- deserializers
-
registerDeserializer
Register deserializers of the inheriting class.Will be called after default deserializer were registered.
- Parameters:
deserializers
- deserializers
-