Top Description Inners Fields Constructors Methods
com.fasterxml.jackson.databind.ser.impl

public final Class ReadOnlyClassToSerializerMap

extends Object
Class Inheritance
Imports
com.fasterxml.jackson.databind.JavaType, .JsonSerializer, com.fasterxml.jackson.databind.util.LookupCache, .TypeKey

Optimized lookup table for accessing two types of serializers; typed and non-typed. Only accessed from a single thread, so no synchronization needed for accessors.

Note that before 2.6 this class was much smaller, and referred most operations to separate JsonSerializerMap, but in 2.6 functions were combined.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final ReadOnlyClassToSerializerMap.Bucket[]
private final int
private final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static final int
findSize(int size)

public static ReadOnlyClassToSerializerMap
from(LookupCache<TypeKey, JsonSerializer<Object>> src)

Factory method for constructing an instance.

public int
size()

public JsonSerializer<Object>
public JsonSerializer<Object>
public JsonSerializer<Object>
public JsonSerializer<Object>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_bucketsback to summary
private final ReadOnlyClassToSerializerMap.Bucket[] _buckets
_maskback to summary
private final int _mask
_sizeback to summary
private final int _size

Constructor Detail

ReadOnlyClassToSerializerMapback to summary
public ReadOnlyClassToSerializerMap(LookupCache<TypeKey, JsonSerializer<Object>> src)

Method Detail

findSizeback to summary
private static final int findSize(int size)
fromback to summary
public static ReadOnlyClassToSerializerMap from(LookupCache<TypeKey, JsonSerializer<Object>> src)

Factory method for constructing an instance.

sizeback to summary
public int size()
typedValueSerializerback to summary
public JsonSerializer<Object> typedValueSerializer(JavaType type)
typedValueSerializerback to summary
public JsonSerializer<Object> typedValueSerializer(Class<?> type)
untypedValueSerializerback to summary
public JsonSerializer<Object> untypedValueSerializer(JavaType type)
untypedValueSerializerback to summary
public JsonSerializer<Object> untypedValueSerializer(Class<?> type)
com.fasterxml.jackson.databind.ser.impl back to summary

private final Class ReadOnlyClassToSerializerMap.Bucket

extends Object
Class Inheritance
  • java.lang.Object
  • com.fasterxml.jackson.databind.ser.impl.ReadOnlyClassToSerializerMap.Bucket

Field Summary

Modifier and TypeField and Description
protected final Class<?>
protected final boolean
protected final JavaType
public final ReadOnlyClassToSerializerMap.Bucket
public final JsonSerializer<Object>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
public boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_classback to summary
protected final Class<?> _class
_isTypedback to summary
protected final boolean _isTyped
_typeback to summary
protected final JavaType _type
nextback to summary
public final ReadOnlyClassToSerializerMap.Bucket next
valueback to summary
public final JsonSerializer<Object> value

Constructor Detail

Bucketback to summary
public Bucket(ReadOnlyClassToSerializerMap.Bucket next, TypeKey key, JsonSerializer<Object> value)

Method Detail

matchesTypedback to summary
public boolean matchesTyped(Class<?> key)
matchesTypedback to summary
public boolean matchesTyped(JavaType key)
matchesUntypedback to summary
public boolean matchesUntyped(Class<?> key)
matchesUntypedback to summary
public boolean matchesUntyped(JavaType key)