rd-framework / com.jetbrains.rd.framework / DelegatedMarshaller

DelegatedMarshaller

open class DelegatedMarshaller<TFrom : Any, TTo : Any> : UniversalMarshaller<TTo>

Constructors

<init>

DelegatedMarshaller(marshaller: IMarshaller<TFrom>, type: KClass<*>, to: (TFrom) -> TTo, from: (TTo) -> TFrom)

Inherited Properties

_type

open val _type: KClass<*>

id

open val id: RdId

predefinedId

val predefinedId: Int?

reader

val reader: (SerializationCtx, AbstractBuffer) -> T

writer

val writer: (SerializationCtx, AbstractBuffer, T) -> Unit

Inherited Functions

read

open fun read(ctx: SerializationCtx, buffer: AbstractBuffer): T

write

open fun write(ctx: SerializationCtx, buffer: AbstractBuffer, value: T): Unit

Extension Functions

array

fun <T> ISerializer<T>.array(): ISerializer<Array<T>>

deepClonePolymorphic

fun <T> T.deepClonePolymorphic(): T

interned

fun <T : Any> ISerializer<T>.interned(internKey: String): ISerializer<T>

list

fun <T> ISerializer<T>.list(): ISerializer<List<T>>

nullable

fun <T : Any> ISerializer<T>.nullable(): ISerializer<T?>