public void registerClass(Class<?> clazz, TableSchema schema) {
        ColumnToMethodMatchingStrategy matchingStrategy = columnToMethodMatchingStrategy;

        //Create a new POJOSerializer with static .serialize(object, columns) methods
        Map<String, Method> classGetters = new HashMap<>();
        Map<String, Method> classSetters = new HashMap<>();
        for (Method method : clazz.getMethods()) {//Clean up the method names
            if (matchingStrategy.isGetter(method.getName())) {
                String methodName = matchingStrategy.normalizeMethodName(method.getName());
                classGetters.put(methodName, method);
            } else if (matchingStrategy.isSetter(method.getName())) {
                String methodName = matchingStrategy.normalizeMethodName(method.getName());
                classSetters.put(methodName, method);
            }
        }

        Map<String, POJOFieldSerializer> schemaSerializers = new HashMap<>();
        Map<String, POJOFieldDeserializer> schemaDeserializers = new ConcurrentHashMap<>();
        boolean defaultsSupport = schema.hasDefaults();

        for (ClickHouseColumn column : schema.getColumns()) {
            String propertyName = columnToMethodMatchingStrategy.normalizeColumnName(column.getColumnName());
            Method getterMethod = classGetters.get(propertyName);
            if (getterMethod != null) {
                schemaSerializers.put(column.getColumnName(), (obj, stream) -> {
                    Object value = getterMethod.invoke(obj);

                    if (RowBinaryFormatSerializer.writeValuePreamble(stream, defaultsSupport, column, value)) {
                        SerializerUtils.serializeData(stream, value, column);
                    }
                });
            } else {
                LOG.warn("No getter method found for column: {}", propertyName);
            }

            // Deserialization stuff
            Method setterMethod = classSetters.get(propertyName);
            if (setterMethod != null) {
                schemaDeserializers.put(column.getColumnName(), SerializerUtils.compilePOJOSetter(setterMethod, column));
            } else {
                LOG.warn("No setter method found for column: {}", propertyName);
            }
        }

        Map<String, Map<String, POJOFieldSerializer>> classSerializers = serializers.computeIfAbsent(clazz, k -> new HashMap<>());
        Map<String, Map<String, POJOFieldDeserializer>> classDeserializers = deserializers.computeIfAbsent(clazz, k -> new HashMap<>());

        String schemaKey;
        if (schema.getTableName() != null && schema.getQuery() == null) {
            schemaKey = schema.getTableName();
        } else if (schema.getQuery() != null && schema.getTableName() == null) {
            schemaKey = schema.getQuery();
        } else {
            throw new IllegalArgumentException("Table schema has both query and table name set. Only one is allowed.");
        }
        classSerializers.put(schemaKey, schemaSerializers);
        classDeserializers.put(schemaKey, schemaDeserializers);
    }
This class glues serialization staff together
client-v2/src/main/java/com/clickhouse/client/api/serde/POJOSerDe.java