Codec<CodeWithScope>, Decoder<CodeWithScope>, Encoder<CodeWithScope>public class CodeWithScopeCodec extends Object implements Codec<CodeWithScope>
CodeWithScope instances.| Constructor | Description |
|---|---|
CodeWithScopeCodec(Codec<Document> documentCodec) |
Creates a new CodeWithScopeCodec.
|
| Modifier and Type | Method | Description |
|---|---|---|
CodeWithScope |
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,
CodeWithScope codeWithScope,
EncoderContext encoderContext) |
Encode an instance of the type parameter
T into a BSON value. |
Class<CodeWithScope> |
getEncoderClass() |
Returns the Class instance that this encodes.
|
public CodeWithScopeCodec(Codec<Document> documentCodec)
documentCodec - a Codec for encoding and decoding the CodeWithScope.getScope().public CodeWithScope decode(BsonReader bsonReader, DecoderContext decoderContext)
DecoderT.decode in interface Decoder<CodeWithScope>bsonReader - the BSON readerdecoderContext - the decoder contextT.public void encode(BsonWriter writer, CodeWithScope codeWithScope, EncoderContext encoderContext)
EncoderT into a BSON value.encode in interface Encoder<CodeWithScope>writer - the BSON writer to encode intocodeWithScope - the value to encodeencoderContext - the encoder contextpublic Class<CodeWithScope> getEncoderClass()
EncodergetEncoderClass in interface Encoder<CodeWithScope>