register<T, G extends Object?> method

void register<T, G extends Object?>(
  1. FieldTransformer<T, G?> transformationFunction
)

Registers a transformer function for a specific field type.

Parameters:

  • T The type of the field value that the transformer handles.
  • G The type that the field value should be transformed into.
  • transformationFunction The function that performs the transformation.

Implementation

void register<T, G extends Object?>(
  FieldTransformer<T, G?> transformationFunction,
) {
  final fieldTransformerFactory = FieldTransformerFactory<T, G?>(
    transformationFunction: transformationFunction,
  );
  factoriesByType[T] = fieldTransformerFactory;
}