KpaElementFactory
Factory of KpaElement values for a particular backing representation.
Consolidates "wrap a typed value into a KpaPrimitive" and "rebuild a KpaStruct / KpaList from a snapshot" responsibilities for an adapter family. Each adapter family is expected to expose a single factory instance (typically an object) that KpaStruct.factory and KpaList.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.