- All Superinterfaces:
Command
Simple subtype of
Command that can be executed and produce a result
immediately (without child stack frames or making calls).-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA default implementation of StackFrame for use by InlineCommand implementations. -
Method Summary
Modifier and TypeMethodDescriptiondefault InlineCommand.InlineStackFramecreateStackFrame(Namespace namespace, List<Value> args) Create a StackFrame to execute the command with the provided Namespace and arguments.Execute the command with the given environment, namespace and arguments.
-
Method Details
-
process
Execute the command with the given environment, namespace and arguments.- Parameters:
context- current environmentnamespace- current namespaceargs- arguments- Returns:
- result
- Throws:
Exception- on error
-
createStackFrame
default InlineCommand.InlineStackFrame createStackFrame(Namespace namespace, List<Value> args) throws Exception Create a StackFrame to execute the command with the provided Namespace and arguments.The default implementation of this method returns an
InlineCommand.InlineStackFramewith this command, and provided namespace and arguments. Implementations can override to further validate the context or delegate to another command.- Specified by:
createStackFramein interfaceCommand- Parameters:
namespace- current namespaceargs- arguments- Returns:
- stack frame to execute command with provided arguments
- Throws:
Exception- if stack frame cannot be created
-