Registers provider associated with given generic kClass for contextual serialization. When a serializer is requested from a module, provider is being called with type arguments serializers of the particular kClass usage.
Creates a builder to register subclasses of a given baseClass for polymorphic serialization. If baseSerializer is not null, registers it as a serializer for baseClass, which is useful if the base class is serializable itself. To register subclasses, PolymorphicModuleBuilder.subclass builder function can be used.
Adds a default deserializers provider associated with the given baseClass to the resulting module. defaultDeserializerProvider is invoked when no polymorphic serializers associated with the
className in the scope of baseClass were found.
className could be
null for formats that support nullable class discriminators (currently only
useArrayPolymorphism set to