public class TypeJsonSerializerMap
extends java.lang.Object
json type serializers
.Modifier and Type | Field and Description |
---|---|
protected TypeCache<TypeJsonSerializer> |
cache |
protected TypeCache<TypeJsonSerializer> |
map |
Constructor and Description |
---|
TypeJsonSerializerMap()
Creates new serializers map and registers defaults.
|
TypeJsonSerializerMap(TypeJsonSerializerMap defaultSerializerMap)
Creates new empty serializer map with given defaults map.
|
Modifier and Type | Method and Description |
---|---|
protected TypeJsonSerializer |
_lookup(java.lang.Class type) |
static TypeJsonSerializerMap |
get()
Returns default instance.
|
TypeJsonSerializer |
lookup(java.lang.Class type)
Lookups for the
serializer for given type. |
protected TypeJsonSerializer |
lookupSerializer(java.lang.Class type)
Get type serializer from map.
|
void |
register(java.lang.Class type,
TypeJsonSerializer typeJsonSerializer)
Registers new serializer.
|
void |
registerDefaults()
Registers default set of
serializers . |
protected final TypeCache<TypeJsonSerializer> map
protected final TypeCache<TypeJsonSerializer> cache
public TypeJsonSerializerMap()
public TypeJsonSerializerMap(TypeJsonSerializerMap defaultSerializerMap)
public static TypeJsonSerializerMap get()
public void registerDefaults()
serializers
.public void register(java.lang.Class type, TypeJsonSerializer typeJsonSerializer)
public TypeJsonSerializer lookup(java.lang.Class type)
serializer
for given type.
If serializer not found, then all interfaces and subclasses of the type are checked.
Finally, if no serializer is found, object's serializer is returned.protected TypeJsonSerializer lookupSerializer(java.lang.Class type)
protected TypeJsonSerializer _lookup(java.lang.Class type)
Copyright © 2003-present Jodd Team