PolymorphicKind

Polymorphic kind represents a (bounded) polymorphic value, that is referred by some base class or interface, but its structure is defined by one of the possible implementations. Polymorphic kind is, by its definition, a union kind and is extracted to its own subtype to emphasize bounded and sealed polymorphism common property: not knowing the actual type statically and requiring formats to additionally encode it.

Inheritors

Types

Link copied to clipboard

Open polymorphic kind represents statically unknown type that is hidden behind a given base class or interface. PolymorphicSerializer can be used as an example of polymorphic serialization.

Link copied to clipboard

Sealed kind represents Kotlin sealed classes, where all subclasses are known statically at the moment of declaration. SealedClassSerializer can be used as an example of sealed serialization.

Functions

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String