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

divkit.dsl.core.Resolution.kt Maven / Gradle / Ivy

Go to download

DivKit is an open source Server-Driven UI (SDUI) framework. SDUI is a an emerging technique that leverage the server to build the user interfaces of their mobile app.

There is a newer version: 30.19.0
Show newest version
package divkit.dsl.core

import kotlin.Any

sealed interface Resolution

class FinalResolution internal constructor(
    val reference: ReferenceProperty,
    val value: Any,
) : Resolution

class ProxyResolution internal constructor(
    val reference: ReferenceProperty,
    val proxy: ReferenceProperty,
) : Resolution

infix fun  ReferenceProperty.bind(value: T): Resolution = FinalResolution(this, value)

infix fun  ReferenceProperty.bind(property: Property): Resolution = when (property) {
    is LiteralProperty -> FinalResolution(this, property.value)
    is ExpressionProperty -> FinalResolution(this, property.expression)
    is ReferenceProperty -> ProxyResolution(this, property)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy