java.lang.Object
org.praxislive.core.Value
org.praxislive.core.types.PMap.MapBasedValue
org.praxislive.core.ControlInfo
Information on the type, inputs, outputs and properties of a
Control.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringMap key for the list of defaultValues.static final StringOptional map key to mark a control as deprecated.static final StringOptional map key to mark a control as relating to expert / advanced usage.static final StringMap key for the inputs list ofArgumentInfo.static final StringMap key for the outputs list ofArgumentInfo.static final StringOptional map key to mark a property as transient, and so not to be included in any serialized representation of the component state.static final StringMap key for the control type.static final StringValue type name. -
Method Summary
Modifier and TypeMethodDescriptionThe type of the control.static ControlInfocreateActionInfo(PMap properties) Create ControlInfo for an action control.static ControlInfocreateFunctionInfo(List<ArgumentInfo> inputs, List<ArgumentInfo> outputs, PMap properties) Create ControlInfo for a function control.static ControlInfocreatePropertyInfo(List<ArgumentInfo> arguments, List<Value> defaults, PMap properties) static ControlInfocreatePropertyInfo(ArgumentInfo argument, Value def, PMap properties) Create ControlInfo for a property control.static ControlInfocreateReadOnlyPropertyInfo(List<ArgumentInfo> arguments, PMap properties) static ControlInfocreateReadOnlyPropertyInfo(ArgumentInfo argument, PMap properties) Create ControlInfo for a read-only property control.defaults()The list of default values.static Optional<ControlInfo> Coerce the provided Value into a ControlInfo if possible.inputs()The list of inputArgumentInfo.outputs()The list of outputArgumentInfo.static ControlInfoParse the provided String into a ControlInfo if possible.Access the map of properties.Methods inherited from class org.praxislive.core.types.PMap.MapBasedValue
dataMap, equals, equivalent, hashCode, toString
-
Field Details
-
TYPE_NAME
Value type name.- See Also:
-
KEY_TYPE
Map key for the control type.- See Also:
-
KEY_INPUTS
Map key for the inputs list ofArgumentInfo.- See Also:
-
KEY_OUTPUTS
Map key for the outputs list ofArgumentInfo.- See Also:
-
KEY_DEFAULTS
Map key for the list of defaultValues. Only relevant for properties.- See Also:
-
KEY_TRANSIENT
Optional map key to mark a property as transient, and so not to be included in any serialized representation of the component state.- See Also:
-
KEY_DEPRECATED
Optional map key to mark a control as deprecated.- See Also:
-
KEY_EXPERT
Optional map key to mark a control as relating to expert / advanced usage. A user interface might choose to display such a control in a different way.- See Also:
-
-
Method Details
-
controlType
The type of the control.- Returns:
- control type
-
properties
Access the map of properties. The map includes the type, inputs, outputs and defaults, as well as any custom or optional properties.This method is equivalent to calling
PMap.MapBasedValue.dataMap().- Returns:
- property map
-
defaults
The list of default values. May be empty if not a property or not specified.- Returns:
- list of default values
-
inputs
The list of inputArgumentInfo.- Returns:
- input argument info
-
outputs
The list of outputArgumentInfo.- Returns:
- output argument info
-
createFunctionInfo
public static ControlInfo createFunctionInfo(List<ArgumentInfo> inputs, List<ArgumentInfo> outputs, PMap properties) Create ControlInfo for a function control.- Parameters:
inputs- list of input infooutputs- list of output infoproperties- additional properties (may be null)- Returns:
- control info
-
createActionInfo
Create ControlInfo for an action control.- Parameters:
properties- additional properties (may be null)- Returns:
- control info
-
createPropertyInfo
Create ControlInfo for a property control.- Parameters:
argument- property value infodef- default valueproperties- additional properties (may be null)- Returns:
- control info
-
createPropertyInfo
public static ControlInfo createPropertyInfo(List<ArgumentInfo> arguments, List<Value> defaults, PMap properties) -
createReadOnlyPropertyInfo
Create ControlInfo for a read-only property control.- Parameters:
argument- property value infoproperties- additional properties (may be null)- Returns:
- control info
-
createReadOnlyPropertyInfo
-
from
Coerce the provided Value into a ControlInfo if possible.- Parameters:
arg- value of unknown type- Returns:
- control info or empty optional
-
parse
Parse the provided String into a ControlInfo if possible.- Parameters:
string- text to parse- Returns:
- control info
- Throws:
ValueFormatException- if parsing fails
-