Conversion to be applied to properties when rendered through BaseValueRenderer.
Known subtypes in package:
Known usages in package:
All versions:
During rendering, the annotation's render function is called.
The function must return a Pair of the converted property name and value.
Multiple ConvertProperty annotations can apply per property, and the output of one
annotation's render function is used as input to the next.
Annotations are applied the order as declared on the property.
If the annotated property is overriding a parent property, the parent property's annotations are
applied first.
// convert duration to the number of seconds
@ConvertProperty {
render = (property, _) -> Pair(property.key, property.value.toUnit("s"))
}
timeout: Duration
ConvertProperty can be subclassed to define re-usable property converters.
The conversion defined in the previous example can be rewritten as:
Conversion to be applied to properties when rendered through
BaseValueRenderer.