java.lang.Object
org.praxislive.script.ScriptStackFrame.Builder
- Enclosing class:
ScriptStackFrame
A builder for
ScriptStackFrame.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionallowedCommands(List<String> commands) Specify a list of allowed commands to filter those available from the provided namespace.build()Build the ScriptStackFrame.createConstant(String id, Value value) Create a constant with the given name and value in the script namespace.createVariable(String id, Value value) Create a variable with the given name and value in the script namespace.inline()Run the script directly in the provided namespace rather than a child.Trap errors.
-
Method Details
-
inline
Run the script directly in the provided namespace rather than a child.- Returns:
- this for chaining
-
trapErrors
Trap errors. Error messages will be aggregated and script execution will attempt to continue. If no allowed commands have been specified, an empty list of allowed commands will be set.- Returns:
- this for chaining
-
allowedCommands
Specify a list of allowed commands to filter those available from the provided namespace.- Parameters:
commands- list of allowed commands- Returns:
- this for chaining
-
createConstant
Create a constant with the given name and value in the script namespace.- Parameters:
id- constant namevalue- constant value- Returns:
- this for chaining
-
createVariable
Create a variable with the given name and value in the script namespace.- Parameters:
id- variable namevalue- variable value- Returns:
- this for chaining
-
build
Build the ScriptStackFrame.- Returns:
- script stackframe
-