java.lang.Object
tools.jackson.databind.JacksonModule
- All Implemented Interfaces:
tools.jackson.core.Versioned
- Direct Known Subclasses:
SimpleModule
Simple interface for extensions that can be registered with
ObjectMapper
to provide a well-defined set of extensions to default functionality; such as
support for new data types.
NOTE: was named just Module
in Jackson 2.x but renamed due to naming
conflict with Java 9+ Module
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Interface Jackson exposes to modules for purpose of registering extended functionality. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIterable<? extends JacksonModule>
Returns the list of dependent modules this module has, if any.abstract String
Method that returns a display that can be used by Jackson for informational purposes, as well as in associating extensions with module that provides them.Method that returns an id that may be used to determine if twoJacksonModule
instances are considered to be of same type, for purpose of preventing multiple registrations of "same" module,abstract void
setupModule
(JacksonModule.SetupContext context) Method called byObjectMapper
when module is registered.abstract tools.jackson.core.Version
version()
Method that returns version of this module.
-
Constructor Details
-
JacksonModule
public JacksonModule()
-
-
Method Details
-
getModuleName
Method that returns a display that can be used by Jackson for informational purposes, as well as in associating extensions with module that provides them. -
version
public abstract tools.jackson.core.Version version()Method that returns version of this module. Can be used by Jackson for informational purposes.- Specified by:
version
in interfacetools.jackson.core.Versioned
-
getRegistrationId
Method that returns an id that may be used to determine if twoJacksonModule
instances are considered to be of same type, for purpose of preventing multiple registrations of "same" module,Default implementation returns value of class name (
Class.getName()
).- Since:
- 3.0
-
getDependencies
Returns the list of dependent modules this module has, if any. It is called to let modules register other modules as dependencies. Modules returned will be registered before this module is registered, in iteration order. -
setupModule
Method called byObjectMapper
when module is registered. It is called to let module register functionality it provides, using callback methods passed-in context object exposes.
-