property
inline fun <T> property(name: String, value: T, description: String? = null, fixedValues: Set<T> = emptySet(), readOnly: Boolean = false): Property<T>(source)
Create the appropriate PropertyXxx instance for the supplied value.
Example usage: val pInt = property("count", 5) val pString = property("name", "hello") val pClass = property("klass", String::class) val pLogLevel = property("logLevel", LogLevel.Error)
Return
A Property subclass that matches the type of value.
Parameters
name
Unique identifier for the property.
value
The initial value.
description
Optional human‑readable description.
fixedValues
Optional set of values that the property may assume.
readOnly
If true the property cannot be changed after creation.
T
The type of the property value.