Codec<BsonJavaScriptWithScope>
, Decoder<BsonJavaScriptWithScope>
, Encoder<BsonJavaScriptWithScope>
public class BsonJavaScriptWithScopeCodec extends Object implements Codec<BsonJavaScriptWithScope>
BsonJavaScriptWithScope
instances.Constructor | Description |
---|---|
BsonJavaScriptWithScopeCodec(Codec<BsonDocument> documentCodec) |
Construct a new instance with the given codec to use for the nested document
|
Modifier and Type | Method | 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. |
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 Class<BsonJavaScriptWithScope> getEncoderClass()
Encoder
getEncoderClass
in interface Encoder<BsonJavaScriptWithScope>