public class InstructionFunction extends java.lang.Object implements RtflFunction
| Constructor and Description |
|---|
InstructionFunction(RtflInstruction[] instructions)
Instantiates a new InstructionFunction with the provided instructions
|
InstructionFunction(RtflInstruction[] instructions,
java.lang.String[] argumentNames)
Instantiates a new InstructionFunction with the provided instructions and argument names
|
| Modifier and Type | Method and Description |
|---|---|
RtflType |
run(RtflType[] args,
RtflRuntime rt,
Scope scope)
Runs the function in the provided scope.
|
public InstructionFunction(RtflInstruction[] instructions)
instructions - the instructions to store in this functionpublic InstructionFunction(RtflInstruction[] instructions, java.lang.String[] argumentNames)
instructions - the instructions to store in this functionargumentNames - The names of this function's argumentspublic RtflType run(RtflType[] args, RtflRuntime rt, Scope scope) throws RuntimeException
RtflFunctionrun in interface RtflFunctionargs - the arguments provided to this functionrt - the Runtime to use for executing this functionscope - the scope in which to execute this functionRuntimeException - if a runtime error occurs during the execution of this function