Skip to main content Link Menu Expand (external link) Document Search Copy Copied

TypeConverter

The type converters are the linchpin of Konvert.

Every mapping between types, e.g. from String to Int, is implemented by a TypeConverter. Without any TypeConverter, Konvert would not even know how to map from String to String.

Therefore, Konvert provides a lot of TypeConverter in the konvert-converter module. You can even simply create your own (little) library with a collection of custom TypeConverter and provide them to Konvert during KSP (TODO: document).

Startup

During compilation startup, Konvert uses SPI to collect the implementations of TypeConverter on the KSP classpath. Additionally, Konvert has a similar concept to load all previously generated mapping functions and registers them as well as TypeConverter (TODO: document).