KpaElementFactory

Factory of KpaElement values for a particular backing representation.

Consolidates "wrap a typed value into a KpaPrimitive" and "rebuild a RebuildableKpaStruct / RebuildableKpaList from a snapshot" responsibilities for an adapter family. Each adapter family is expected to expose a single factory instance (typically an object) that RebuildableKpaStruct.factory and RebuildableKpaList.factory both reference.

The primitive helpers are member extension functions: they are only callable when a KpaElementFactory is the dispatch receiver. The mutation DSL achieves that via interface delegation (: KpaElementFactory by original.factory); outside the DSL, use with(factory) { ... }.

Inheritors

Properties

Link copied to clipboard

A pre-built KpaPrimitive representing JSON null.

Functions

Link copied to clipboard
Link copied to clipboard

Builds a new RebuildableKpaList of the factory's adapter family wrapping list.

Link copied to clipboard

Builds a new RebuildableKpaStruct of the factory's adapter family wrapping map.