public class MapCodecProvider extends java.lang.Object implements CodecProvider
CodecProvider
for the Map class and all the default Codec implementations on which it depends.Constructor and Description |
---|
MapCodecProvider()
Construct a new instance with a default
BsonTypeClassMap . |
MapCodecProvider(BsonTypeClassMap bsonTypeClassMap)
Construct a new instance with the given instance of
BsonTypeClassMap . |
MapCodecProvider(BsonTypeClassMap bsonTypeClassMap,
Transformer valueTransformer)
Construct a new instance with the given instance of
BsonTypeClassMap . |
MapCodecProvider(Transformer valueTransformer)
Construct a new instance with a default
BsonTypeClassMap and the given Transformer . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
<T> Codec<T> |
get(java.lang.Class<T> clazz,
CodecRegistry registry)
Get a
Codec using the given context, which includes, most importantly, the Class for which a Codec is required. |
int |
hashCode() |
public MapCodecProvider()
BsonTypeClassMap
.public MapCodecProvider(BsonTypeClassMap bsonTypeClassMap)
BsonTypeClassMap
.bsonTypeClassMap
- the non-null BsonTypeClassMap
with which to construct instances of DocumentCodec
and ListCodec
public MapCodecProvider(Transformer valueTransformer)
BsonTypeClassMap
and the given Transformer
. The transformer is used by the
MapCodec as a last step when decoding values.valueTransformer
- the value transformer for decoded valuespublic MapCodecProvider(BsonTypeClassMap bsonTypeClassMap, Transformer valueTransformer)
BsonTypeClassMap
.bsonTypeClassMap
- the non-null BsonTypeClassMap
with which to construct instances of MapCodec
.valueTransformer
- the value transformer for decoded valuespublic <T> Codec<T> get(java.lang.Class<T> clazz, CodecRegistry registry)
CodecProvider
Codec
using the given context, which includes, most importantly, the Class for which a Codec
is required.get
in interface CodecProvider
T
- the type of the class for which a Codec is requiredclazz
- the Class for which to get a Codecregistry
- the registry to use for resolving dependent Codec instancespublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object