public class BsonJavaScriptWithScopeCodec extends java.lang.Object implements Codec<BsonJavaScriptWithScope>
BsonJavaScriptWithScope
instances.Constructor and Description |
---|
BsonJavaScriptWithScopeCodec(Codec<BsonDocument> documentCodec)
Construct a new instance with the given codec to use for the nested document
|
Modifier and Type | Method and Description |
---|---|
BsonJavaScriptWithScope |
decode(BsonReader bsonReader,
DecoderContext decoderContext)
Decodes a BSON value from the given reader into an instance of the type parameter
T . |
void |
encode(BsonWriter writer,
BsonJavaScriptWithScope codeWithScope,
EncoderContext encoderContext)
Encode an instance of the type parameter
T into a BSON value. |
java.lang.Class<BsonJavaScriptWithScope> |
getEncoderClass()
Returns the Class instance that this encodes.
|
public BsonJavaScriptWithScopeCodec(Codec<BsonDocument> documentCodec)
documentCodec
- the non-null codec for the nested documentpublic BsonJavaScriptWithScope decode(BsonReader bsonReader, DecoderContext decoderContext)
Decoder
T
.decode
in interface Decoder<BsonJavaScriptWithScope>
bsonReader
- the BSON readerdecoderContext
- the decoder contextT
.public void encode(BsonWriter writer, BsonJavaScriptWithScope codeWithScope, EncoderContext encoderContext)
Encoder
T
into a BSON value.encode
in interface Encoder<BsonJavaScriptWithScope>
writer
- the BSON writer to encode intocodeWithScope
- the value to encodeencoderContext
- the encoder contextpublic java.lang.Class<BsonJavaScriptWithScope> getEncoderClass()
Encoder
getEncoderClass
in interface Encoder<BsonJavaScriptWithScope>
Copyright © 2010 - 2020 Adobe. All Rights Reserved