mvrx-mocking / com.airbnb.mvrx.mocking / DataClassSetDsl / Setter

Setter

class Setter<DataClass : Any, PropType>

Helper to copy a nested class and update a property on it.

Constructors

<init>

Setter(instance: DataClass, property: KProperty0<PropType>)

Helper to copy a nested class and update a property on it.

Functions

getValue

fun getValue(dataClass: DataClass): PropType

This assumes the data class is the top level data class. This doesn't work to start in the middle of the chain.

set

fun set(value: PropType): DataClass