public class CodeWithScopeCodec extends java.lang.Object implements Codec<CodeWithScope>
CodeWithScope instances.| 构造器和说明 |
|---|
CodeWithScopeCodec(Codec<Document> documentCodec)
Creates a new CodeWithScopeCodec.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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)
DecoderT.decode 在接口中 Decoder<CodeWithScope>bsonReader - the BSON readerdecoderContext - the decoder contextT.public void encode(BsonWriter writer, CodeWithScope codeWithScope, EncoderContext encoderContext)
EncoderT into a BSON value.encode 在接口中 Encoder<CodeWithScope>writer - the BSON writer to encode intocodeWithScope - the value to encodeencoderContext - the encoder contextpublic java.lang.Class<CodeWithScope> getEncoderClass()
EncodergetEncoderClass 在接口中 Encoder<CodeWithScope>