Constructor | Description |
---|---|
MapCodecβ() |
Construct a new instance with a default
CodecRegistry |
MapCodecβ(CodecRegistry registry) |
Construct a new instance with the given registry
|
MapCodecβ(CodecRegistry registry,
BsonTypeClassMap bsonTypeClassMap) |
Construct a new instance with the given registry and BSON type class map.
|
MapCodecβ(CodecRegistry registry,
BsonTypeClassMap bsonTypeClassMap,
Transformer valueTransformer) |
Construct a new instance with the given registry and BSON type class map.
|
Modifier and Type | Method | Description |
---|---|---|
Map<String,Object> |
decodeβ(BsonReader reader,
DecoderContext decoderContext) |
Decodes a BSON value from the given reader into an instance of the type parameter
T . |
void |
encodeβ(BsonWriter writer,
Map<String,Object> map,
EncoderContext encoderContext) |
Encode an instance of the type parameter
T into a BSON value. |
Class<Map<String,Object>> |
getEncoderClassβ() |
Returns the Class instance that this encodes.
|
public MapCodecβ()
CodecRegistry
public MapCodecβ(CodecRegistry registry)
registry
- the registrypublic MapCodecβ(CodecRegistry registry, BsonTypeClassMap bsonTypeClassMap)
registry
- the registrybsonTypeClassMap
- the BSON type class mappublic MapCodecβ(CodecRegistry registry, BsonTypeClassMap bsonTypeClassMap, Transformer valueTransformer)
registry
- the registrybsonTypeClassMap
- the BSON type class mapvalueTransformer
- the value transformer to use as a final step when decoding the value of any field in the mappublic void encodeβ(BsonWriter writer, Map<String,Object> map, EncoderContext encoderContext)
Encoder
T
into a BSON value.public Map<String,Object> decodeβ(BsonReader reader, DecoderContext decoderContext)
Decoder
T
.public Class<Map<String,Object>> getEncoderClassβ()
Encoder
getEncoderClass
in interface Encoder<Map<String,Object>>