public class PojoContext extends Object
| Constructor and Description |
|---|
PojoContext(TypesModel typesModel,
List<CodecResolver> codecResolvers) |
| Modifier and Type | Method and Description |
|---|---|
<T> org.bson.codecs.Codec<T> |
get(Class<T> clazz,
org.bson.codecs.configuration.CodecRegistry registry) |
<T> org.bson.codecs.Codec<T> |
getCodec(Type type,
TypeCodecRegistry typeCodecRegistry)
Calculates and returns a codec for the given type, null otherwise
|
ReflectionCodec |
resolve(Type type,
TypeCodecRegistry typeCodecRegistry)
Iterates over the list of codecResolvers and returns a ReflectionCodec if match is found.
|
public PojoContext(TypesModel typesModel, List<CodecResolver> codecResolvers)
public <T> org.bson.codecs.Codec<T> get(Class<T> clazz, org.bson.codecs.configuration.CodecRegistry registry)
public <T> org.bson.codecs.Codec<T> getCodec(Type type, TypeCodecRegistry typeCodecRegistry)
T - the value typetype - type for which a codec is requestedtypeCodecRegistry - codec registry that can handle any type including parameterizd types, generic arrays, etcpublic ReflectionCodec resolve(Type type, TypeCodecRegistry typeCodecRegistry)
type - the value typetypeCodecRegistry - codec registry that can handle any type including parameterizd types, generic arrays, etcCopyright © 2017 BILD GmbH & Co. KG. All rights reserved.