String Control Ifc
Represents a string-valued simulation control extracted from a property annotated with KSLStringControl.
The interface is intentionally parallel to ControlIfc for numeric controls but replaces the numeric value and bounds with a String value and an optional membership constraint (allowedValues).
Setting value to a string that is not a member of allowedValues (when that list is non-empty) throws a ControlUpdateException. The underlying property is only updated when validation passes.
The initialValue is captured once at extraction time and provides a known safe fallback state. It is not automatically restored on error — callers may read it and assign it back manually if a revert is desired.
Properties
Permitted values declared on the KSLStringControl annotation. An empty list means the control is unconstrained — any String is accepted.
Optional comment supplied in the KSLStringControl annotation.
Name of the model element that owns this control.
Ancestor names from the model root down to (but not including) the model element holding this control, also exclusive of the Model itself. Empty when the control's element is a direct child of the Model.
Simple class name of the model element that owns this control.
The string value captured at extraction time. Provides a safe fallback if the caller needs to revert after a failed or unwanted update.
Identifier of the parent model element, or null.
Name of the parent of the model element holding this control, or null when that element is a direct child of the Model. See ControlIfc.parentElementName for the same convention applied to numeric controls.
Simple class name of the parent model element, or null.
Name of the annotated property.
Current string value of the underlying property. Setting this property validates against allowedValues before delegating to the property setter via reflection.
Functions
Returns true if v is permitted by allowedValues. Always returns true when allowedValues is empty (unconstrained).