PropertyBuilder

DSL builder for creating a strongly-typed Property instance.

Use this builder inside a PropertiesBuilder or a feature block to define a property with a specific type, value, optional description, fixed allowed values, and read-only status.

The builder automatically determines the correct Property subclass based on the type of value.

Example

property("max-retries") {
value = 3
description = "Maximum retry attempts"
fixedValues {
add(1)
add(3)
add(5)
}
}

Notes

Parameters

T

Type of the property value

Properties

Link copied to clipboard

Optional description of the property.

Link copied to clipboard

Optional set of allowed values. Duplicates are removed automatically.

Link copied to clipboard

Marks the property as read-only if true.

Link copied to clipboard
var value: T?

Value of the property. Required before building.

Functions

Link copied to clipboard

DSL helper to define fixedValues inline.