corda / net.corda.core.serialization / ImmutableClassSerializer

# ImmutableClassSerializer

`class ImmutableClassSerializer<T : Any> : Serializer<T>`

Serializes properties and deserializes by using the constructor. This assumes that all backed properties are set via the constructor and the class is immutable.

### Constructors

<init> | `ImmutableClassSerializer(klass: KClass<T>)` Serializes properties and deserializes by using the constructor. This assumes that all backed properties are set via the constructor and the class is immutable.

### Properties

constructor | `val constructor: KFunction<T>`
klass | `val klass: KClass<T>`
props | `val props: List<KProperty1<T, *>>`
propsByName | `val propsByName: Map<String, KProperty1<T, *>>`

### Functions

read | `fun read(kryo: Kryo, input: Input, type: Class<T>): T`
write | `fun write(kryo: Kryo, output: Output, obj: T): Unit`