Class BsonDocumentWrapperCodec

    • Constructor Detail

      • BsonDocumentWrapperCodec

        public BsonDocumentWrapperCodec​(Codec<BsonDocument> bsonDocumentCodec)
        Construct a new instance,
        Parameters:
        bsonDocumentCodec - the code to use if the BsonDocumentWrapper has been unwrapped.
    • Method Detail

      • decode

        public BsonDocumentWrapper decode​(BsonReader reader,
                                          DecoderContext decoderContext)
        Decoding of BsonDocumentWrapper instances is not supported, so this method will throw UnsupportedOperationException in all cases.
        Specified by:
        decode in interface Decoder<BsonDocumentWrapper>
        Parameters:
        reader - the BSON reader the reader
        decoderContext - a decoder context, currently unused
        Returns:
        the document
      • getEncoderClass

        public java.lang.Class<BsonDocumentWrapper> getEncoderClass()
        Description copied from interface: Encoder
        Returns the Class instance that this encodes. This is necessary because Java does not reify generic types.
        Specified by:
        getEncoderClass in interface Encoder<BsonDocumentWrapper>
        Returns:
        the Class instance that this encodes.