Interface Encoder<T>

    • Method Detail

      • encode

        void encode​(BsonWriter writer,
                    T value,
                    EncoderContext encoderContext)
        Encode an instance of the type parameter T into a BSON value.
        Parameters:
        writer - the BSON writer to encode into
        value - the value to encode
        encoderContext - the encoder context
      • getEncoderClass

        java.lang.Class<T> getEncoderClass()
        Returns the Class instance that this encodes. This is necessary because Java does not reify generic types.
        Returns:
        the Class instance that this encodes.