Polymorphic

annotation class Polymorphic

Instructs the serialization plugin to use PolymorphicSerializer on an annotated property or type usage. When used on class, replaces its serializer with PolymorphicSerializer everywhere.

This annotation is applied automatically to interfaces and serializable abstract classes and can be applied to open classes in addition to Serializable for the sake of simplicity.

Does not affect sealed classes, because they are gonna be serialized with subclasses automatically with special compiler plugin support which would be added later.

Constructors

Link copied to clipboard
fun Polymorphic()