public class CodeWithScopeCodec extends java.lang.Object implements Codec<CodeWithScope>
CodeWithScope
instances.Constructor and Description |
---|
CodeWithScopeCodec(Codec<Document> documentCodec)
Creates a new CodeWithScopeCodec.
|
Modifier and Type | Method and 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. |
java.lang.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)
Decoder
T
.decode
in interface Decoder<CodeWithScope>
bsonReader
- the BSON readerdecoderContext
- the decoder contextT
.public void encode(BsonWriter writer, CodeWithScope codeWithScope, EncoderContext encoderContext)
Encoder
T
into a BSON value.encode
in interface Encoder<CodeWithScope>
writer
- the BSON writer to encode intocodeWithScope
- the value to encodeencoderContext
- the encoder contextpublic java.lang.Class<CodeWithScope> getEncoderClass()
Encoder
getEncoderClass
in interface Encoder<CodeWithScope>
Copyright © 2010 - 2020 Adobe. All Rights Reserved