public abstract class Module extends java.lang.Object implements Versioned
ObjectMapper
to provide a well-defined set of extensions to default functionality; such as
support for new data types.Modifier and Type | Class and Description |
---|---|
static interface |
Module.SetupContext
Interface Jackson exposes to modules for purpose of registering
extended functionality.
|
Constructor and Description |
---|
Module() |
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<? extends Module> |
getDependencies()
Returns the list of dependent modules this module has, if any.
|
abstract java.lang.String |
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.
|
java.lang.Object |
getTypeId()
Method that returns an id that may be used to determine if two
Module
instances are considered to be of same type, for purpose of preventing
multiple registrations of "same type of" module
(see MapperFeature.IGNORE_DUPLICATE_MODULE_REGISTRATIONS )
If `null` is returned, every instance is considered unique. |
abstract void |
setupModule(Module.SetupContext context)
Method called by
ObjectMapper when module is registered. |
abstract Version |
version()
Method that returns version of this module.
|
public abstract java.lang.String getModuleName()
public abstract Version version()
public java.lang.Object getTypeId()
Module
instances are considered to be of same type, for purpose of preventing
multiple registrations of "same type of" module
(see MapperFeature.IGNORE_DUPLICATE_MODULE_REGISTRATIONS
)
If `null` is returned, every instance is considered unique.
If non-null value is returned, equality of id Objects is used to check whether
modules should be considered to be "of same type"
Default implementation returns value of class name (Class.getName()
).
public abstract void setupModule(Module.SetupContext context)
ObjectMapper
when module is registered.
It is called to let module register functionality it provides,
using callback methods passed-in context object exposes.public java.lang.Iterable<? extends Module> getDependencies()
Copyright © 2010 - 2020 Adobe. All Rights Reserved