public class DocumentCodecProvider extends java.lang.Object implements CodecProvider
CodecProvider
for the Document class and all the default Codec implementations on which it depends.Constructor and Description |
---|
DocumentCodecProvider()
Construct a new instance with a default
BsonTypeClassMap . |
DocumentCodecProvider(BsonTypeClassMap bsonTypeClassMap)
Construct a new instance with the given instance of
BsonTypeClassMap . |
DocumentCodecProvider(BsonTypeClassMap bsonTypeClassMap,
Transformer valueTransformer)
Construct a new instance with the given instance of
BsonTypeClassMap . |
DocumentCodecProvider(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 DocumentCodecProvider()
BsonTypeClassMap
.public DocumentCodecProvider(Transformer valueTransformer)
BsonTypeClassMap
and the given Transformer
. The transformer is used by the
DocumentCodec as a last step when decoding values.valueTransformer
- the value transformer for decoded valuesDocumentCodec.DocumentCodec(org.bson.codecs.configuration.CodecRegistry, BsonTypeClassMap, org.bson.Transformer)
public DocumentCodecProvider(BsonTypeClassMap bsonTypeClassMap)
BsonTypeClassMap
.bsonTypeClassMap
- the non-null BsonTypeClassMap
with which to construct instances of DocumentCodec
and ListCodec
public DocumentCodecProvider(BsonTypeClassMap bsonTypeClassMap, Transformer valueTransformer)
BsonTypeClassMap
.bsonTypeClassMap
- the non-null BsonTypeClassMap
with which to construct instances of DocumentCodec
and ListCodec
.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
Copyright © 2010 - 2020 Adobe. All Rights Reserved