public class DefaultBiMapper
extends java.lang.Object
BiMapper provider, constructs instances, see getInstance(), and utility functions.
Usually you register your classes and adapters here, see BiMapper for details on how to.
Provides out of the box support for
ZonedDateTime| Constructor and Description |
|---|
DefaultBiMapper() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
deserialize(java.util.Map map) |
static void |
deserializeInPlace(java.util.Map map) |
static BiAdapter |
getByteArrayBiAdapter() |
static BiAdapter |
getBytesBiAdapter() |
static BiMapper |
getInstance() |
static <T> void |
registerAdapter(java.lang.Class<T> klass,
BiAdapter adapter) |
static void |
registerClass(java.lang.Class<? extends BiSerializable> klass)
Register a class with explicit de/serialization methods.
|
static <T> T |
serialize(java.lang.Object x)
|
public static final BiMapper getInstance()
public static void deserializeInPlace(java.util.Map map)
public static <T> T deserialize(java.util.Map map)
public static <T> T serialize(java.lang.Object x)
Binder using current set of BiAdapter. See registerAdapter(Class, BiAdapter) for more.T - x - object to serialize (can be array, list, map, binder or any object with registered adapter. processes
in depth, e.g. all values in the map or items in the list.java.lang.IllegalArgumentException - if unkonwn ibject ecnountered which can not be serialized.public static <T> void registerAdapter(java.lang.Class<T> klass,
BiAdapter adapter)
public static void registerClass(java.lang.Class<? extends BiSerializable> klass)
BiSerializable.klass - class to register.public static BiAdapter getByteArrayBiAdapter()
public static BiAdapter getBytesBiAdapter()