All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.pro.respawn.flowmvi.debugger.Util.kt Maven / Gradle / Ivy

Go to download

A Kotlin Multiplatform MVI library based on coroutines with a powerful plugin system

The newest version!
package pro.respawn.flowmvi.debugger

import pro.respawn.flowmvi.api.EmptyState
import pro.respawn.flowmvi.api.MVIAction
import pro.respawn.flowmvi.api.MVIIntent
import pro.respawn.flowmvi.api.MVIState
import pro.respawn.flowmvi.dsl.LambdaIntent

internal inline val  T.name: String
    get() = when (this) {
        is LambdaIntent<*, *> -> "LambdaIntent"
        else -> this::class.simpleName?.removeSuffix("Intent") ?: "Anonymous"
    }

internal inline val  T.name: String get() = this::class.simpleName?.removeSuffix("Action") ?: "Anonymous"

internal inline val  T.name: String
    get() = when (this) {
        is EmptyState -> "Empty"
        else -> this::class.simpleName?.removeSuffix("State") ?: "Anonymous"
    }

internal inline val  T.name: String
    get() = this::class.simpleName?.removeSuffix("Exception") ?: "Anonymous"




© 2015 - 2025 Weber Informatics LLC | Privacy Policy