Class PropertySerializerMap.Multi
- java.lang.Object
-
- com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap
-
- com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap.Multi
-
- Enclosing class:
- PropertySerializerMap
private static final class PropertySerializerMap.Multi extends PropertySerializerMap
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap
PropertySerializerMap.SerializerAndMapResult
-
-
Field Summary
Fields Modifier and Type Field Description private PropertySerializerMap.TypeAndSerializer[]
_entries
private static int
MAX_ENTRIES
Let's limit number of serializers we actually cache; linear lookup won't scale too well beyond smallish number, and if we really want to support larger collections should use a hash map.-
Fields inherited from class com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap
_resetWhenFull
-
-
Constructor Summary
Constructors Constructor Description Multi(PropertySerializerMap base, PropertySerializerMap.TypeAndSerializer[] entries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PropertySerializerMap
newWith(java.lang.Class<?> type, JsonSerializer<java.lang.Object> serializer)
JsonSerializer<java.lang.Object>
serializerFor(java.lang.Class<?> type)
Main lookup method.-
Methods inherited from class com.fasterxml.jackson.databind.ser.impl.PropertySerializerMap
addSerializer, addSerializer, emptyForProperties, emptyForRootValues, emptyMap, findAndAddKeySerializer, findAndAddPrimarySerializer, findAndAddPrimarySerializer, findAndAddRootValueSerializer, findAndAddRootValueSerializer, findAndAddSecondarySerializer, findAndAddSecondarySerializer
-
-
-
-
Field Detail
-
MAX_ENTRIES
private static final int MAX_ENTRIES
Let's limit number of serializers we actually cache; linear lookup won't scale too well beyond smallish number, and if we really want to support larger collections should use a hash map. But it seems unlikely this is a common use case so for now let's just stop building after hard-coded limit. 8 sounds like a reasonable stab for now.- See Also:
- Constant Field Values
-
_entries
private final PropertySerializerMap.TypeAndSerializer[] _entries
-
-
Constructor Detail
-
Multi
public Multi(PropertySerializerMap base, PropertySerializerMap.TypeAndSerializer[] entries)
-
-
Method Detail
-
serializerFor
public JsonSerializer<java.lang.Object> serializerFor(java.lang.Class<?> type)
Description copied from class:PropertySerializerMap
Main lookup method. Takes a "raw" type since usage is always from place where parameterization is fixed such that there cannot be type-parametric variations.- Specified by:
serializerFor
in classPropertySerializerMap
-
newWith
public PropertySerializerMap newWith(java.lang.Class<?> type, JsonSerializer<java.lang.Object> serializer)
- Specified by:
newWith
in classPropertySerializerMap
-
-