Package org.bson.codecs
Class BsonTypeCodecMap
java.lang.Object
org.bson.codecs.BsonTypeCodecMap
An efficient map of BsonType to Codec
- Since:
- 3.3
-
Constructor Summary
ConstructorDescriptionBsonTypeCodecMap
(BsonTypeClassMap bsonTypeClassMap, CodecRegistry codecRegistry) Initializes the map by iterating the keys of the given BsonTypeClassMap and looking up the Codec for the Class mapped to each key. -
Method Summary
-
Constructor Details
-
BsonTypeCodecMap
Initializes the map by iterating the keys of the given BsonTypeClassMap and looking up the Codec for the Class mapped to each key.- Parameters:
bsonTypeClassMap
- the non-null BsonTypeClassMapcodecRegistry
- the non-null CodecRegistry
-
-
Method Details
-
get
Gets the Codec mapped to the given bson type.- Parameters:
bsonType
- the non-null BsonType- Returns:
- the non-null Codec
-