register
Parameters
The discriminator, as the database stores it.
Type Parameters
The class, which has to be @Serializable.
Registers T under the name its DynamicallyMappable declares.
The annotation is multiplatform, so it can sit on a class shared with another platform. Stating the name at the call instead is always available and wins where both are present.
Type Parameters
The class, which has to be @Serializable and carry DynamicallyMappable.
Registers kClass with a serializer supplied by the caller.
The reflective path, for a scanner that found the class rather than a call that named it.
Parameters
The class, which has to be @Serializable.
Its serializer.
The discriminator, as the database stores it.
Throws
INVALID_ARGUMENT where the name is blank, or is already taken by another class.
Registers kClass by looking its serializer up from its own type.
The reflective path, for a caller holding a class rather than a type argument.
Parameters
The class, which has to be @Serializable.
The discriminator, as the database stores it.
Registers kClass under the name its DynamicallyMappable declares.
The path a scanner takes: it found the class by the annotation, so the annotation is what names it.
Parameters
The class, which has to be @Serializable and carry DynamicallyMappable.