code: @SuppressWarnings("unchecked")
      public <T> HandlerRegistration register(Deserializer<T> deserializer) {
          final HandlerRegistration reg = bindDeserializerToType(deserializer, deserializer.handledType());
  
          if (deserializer instanceof HasImpl) {
              Class[] impls = ((HasImpl) deserializer).implTypes();
  
              final HandlerRegistration[] regs = new HandlerRegistration[impls.length + 1];
              regs[0] = reg;
  
              for (int i = 0; i < impls.length; i++) {
                  Class impl = impls[i];
                  regs[i + 1] = bindDeserializerToType(deserializer, impl);
              }
  
              return new HandlerRegistration() {
                  public void removeHandler() {
                      for (HandlerRegistration reg : regs) {
                          reg.removeHandler();
                      }
                  }
              };
          }
  
          return reg;
      }
docs: Register a deserializer of the given type.
  
  @param deserializer  The deserializer of T.
  @param <T>           The type of the object to be deserialized.
  
  @return  The {@link com.google.web.bindery.event.shared.HandlerRegistration} object,
  capable of cancelling this HandlerRegistration to the {@link SerdesManagerImpl}.