public class BsonJavaScriptWithScopeCodec extends 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. |
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)
DecoderT.decode in interface Decoder<BsonJavaScriptWithScope>bsonReader - the BSON readerdecoderContext - the decoder contextT.public void encode(BsonWriter writer, BsonJavaScriptWithScope codeWithScope, EncoderContext encoderContext)
EncoderT 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()
EncodergetEncoderClass in interface Encoder<BsonJavaScriptWithScope>