public Codec < ? > get ( final BsonType bsonType ) { Codec < ? > codec = codecs [ bsonType . getValue ( ) ] ; if ( codec == null ) { Class < ? > clazz = bsonTypeClassMap . get ( bsonType ) ; if ( clazz == null ) { throw new CodecConfigurationException ( format ( "No class mapped for BSON type %s." , bsonType ) ) ; } else { throw new CodecConfigurationException ( format ( "Can't find a codec for %s." , clazz ) ) ; } } return codec ; }
Gets the Codec mapped to the given bson type .