code: public static void addDecodingHook(final Class<?> clazz, final Transformer transformer) {
          decodeHooks = true;
          List<Transformer> transformersForClass = decodingHooks.get(clazz);
          if (transformersForClass == null) {
              transformersForClass = new CopyOnWriteArrayList<Transformer>();
              decodingHooks.put(clazz, transformersForClass);
          }
          transformersForClass.add(transformer);
      }
docs: Registers a {@code Transformer} to use when decoding a specific class from BSON. This class will be one of the basic types supported
  by BSON.
  
  @param clazz       the class to be transformed during decoding
  @param transformer the transformer to use during decoding