DefaultSerializationContext

internal class DefaultSerializationContext(catalog: TypeCatalog, localConverters: List<ParameterConverter<*>>?, val types: TypeLookup) : SerializationContext

Constructors

Link copied to clipboard
constructor(catalog: TypeCatalog, localConverters: List<ParameterConverter<*>>?, types: TypeLookup)

Properties

Link copied to clipboard
open override val types: TypeLookup

The type system as this execution pinned it: dictionaries, containers and OID resolution.

Functions

Link copied to clipboard
open override fun convert(source: Any, expectedOid: Int, pathSegment: String? = null): Any

Runs a value through the first converter that claims it.

Link copied to clipboard
open fun defaultOidForClass(kClass: KClass<*>): Int?

The OID a value of kClass would be declared as, worked out from the class alone - for a container whose elements are not there to ask, such as an empty range or array.

Link copied to clipboard
open override fun findConverter(source: Any, expectedOid: Int): ParameterConverter<Any>?

Looks up the converter that would claim a value, without converting anything.

Link copied to clipboard
open override fun findConverterByClass(sourceClass: KClass<*>, expectedOid: Int): ParameterConverter<Any>?

The query's own converters first, most recently registered first, then the catalog's.