code: public SerializerRegistry register(Class<?> type) {
      if (type == null)
        throw new NullPointerException("type cannot be null");
      return register(type, calculateTypeId(type));
    }
docs: Registers the given class for serialization.
  
  @param type The type class.
  @return The serializer registry.
  @throws RegistrationException If the given {@code type} is already registered