             _oidToType = new Dictionary();
         }
 
+        /**
+         * Register the given encoder to map values of the inType to the inOid. If
+         * an encoder was previously registered for the same inType, it is silently
+         * replaced.
+         *
+         * @param inType
+         * @param inOid
+         * @param encoder
+         */
         public function registerEncoder(inType:Class, inOid:int, encoder:IPGTypeEncoder):void {
             _encoders[inType] = encoder;
             _typeToOid[inType] = inOid;
         }
 
+        /**
+         * Register the given decoder to map values of the given outOid to the outType. If
+         * a decoder was previously registered for the same outOid, it is silently replaced.
+         *
+         * @param outOid
+         * @param outType
+         * @param decoder
+         */
         public function registerDecoder(outOid:int, outType:Class, decoder:IPGTypeDecoder):void {
             _decoders[outOid] = decoder;
             _oidToType[outOid] = outType;


        /**
         * Return the decoder for the given oid
         * @return registered decoder
         * @throws org.postgresql.CodecError if no suitable decoder can be found
         */
        public function getDecoder(oid:int):IPGTypeDecoder {
            if (oid in _decoders) {

        private var _typeToOid:Dictionary;
        private var _oidToType:Dictionary;

        /**
         * Constructor. No encoders or decoders are registered by default.
         */
        public function CodecFactory() {
            // TODO: handle defaults. On input, any unknown type should be mapped
            // to Oid.UNSPECIFIED and sent as its String representation. On output,
            // if sent as text, we can destringify and present text.
            _decoders = new Dictionary();
            _encoders = new Dictionary();

