T
- the type that the instance can encode into BSONpublic interface Encoder<T>
T
into a BSON value.
.Modifier and Type | Method and Description |
---|---|
void |
encode(BsonWriter writer,
T value,
EncoderContext encoderContext)
Encode an instance of the type parameter
T into a BSON value. |
java.lang.Class<T> |
getEncoderClass()
Returns the Class instance that this encodes.
|
void encode(BsonWriter writer, T value, EncoderContext encoderContext)
T
into a BSON value.writer
- the BSON writer to encode intovalue
- the value to encodeencoderContext
- the encoder contextjava.lang.Class<T> getEncoderClass()