T
- the type that the instance can encode into BSONCodec<T>
, CollectibleCodec<T>
AtomicBooleanCodec
, AtomicIntegerCodec
, AtomicLongCodec
, BigDecimalCodec
, BinaryCodec
, BooleanCodec
, BsonArrayCodec
, BsonBinaryCodec
, BsonBooleanCodec
, BsonDateTimeCodec
, BsonDBPointerCodec
, BsonDecimal128Codec
, BsonDocumentCodec
, BsonDocumentWrapperCodec
, BsonDoubleCodec
, BsonInt32Codec
, BsonInt64Codec
, BsonJavaScriptCodec
, BsonJavaScriptWithScopeCodec
, BsonMaxKeyCodec
, BsonMinKeyCodec
, BsonNullCodec
, BsonObjectIdCodec
, BsonRegularExpressionCodec
, BsonStringCodec
, BsonSymbolCodec
, BsonTimestampCodec
, BSONTimestampCodec
, BsonUndefinedCodec
, BsonValueCodec
, ByteArrayCodec
, ByteCodec
, CharacterCodec
, CodeCodec
, CodeWithScopeCodec
, DateCodec
, DBObjectCodec
, DBRefCodec
, Decimal128Codec
, DocumentCodec
, DoubleCodec
, FloatCodec
, GeometryCodec
, GeometryCollectionCodec
, GridFSFileCodec
, InstantCodec
, IntegerCodec
, IterableCodec
, LineStringCodec
, LocalDateCodec
, LocalDateTimeCodec
, LocalTimeCodec
, LongCodec
, MapCodec
, MaxKeyCodec
, MinKeyCodec
, MultiLineStringCodec
, MultiPointCodec
, MultiPolygonCodec
, NamedCoordinateReferenceSystemCodec
, ObjectIdCodec
, PatternCodec
, PointCodec
, PolygonCodec
, RawBsonDocumentCodec
, ShortCodec
, StringCodec
, SymbolCodec
, UuidCodec
public interface Encoder<T>
T
into a BSON value.
.Modifier and Type | Method | Description |
---|---|---|
void |
encode(BsonWriter writer,
T value,
EncoderContext encoderContext) |
Encode an instance of the type parameter
T into a BSON value. |
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 context