public class FunctionArgumentInterpreter extends Object
Constructor and Description |
---|
FunctionArgumentInterpreter(FunctionSignature signature)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
Namespace |
createFunctionNamespace(Interpreter interpreter,
List<Expression> arguments,
boolean variadicAsList,
InterpreterStackTrace stackTrace)
Creates a function namespace that is a child of the interpreter namespace
for the given function arguments.
|
Object[] |
interpret(Interpreter interpreter,
List<Expression> arguments,
boolean variadicAsArray,
boolean variadicArgAsList,
InterpreterStackTrace stackTrace)
Interprets the given arguments with proper variadic argument handling.
|
public FunctionArgumentInterpreter(FunctionSignature signature)
signature
- public Object[] interpret(Interpreter interpreter, List<Expression> arguments, boolean variadicAsArray, boolean variadicArgAsList, InterpreterStackTrace stackTrace) throws ErrorException
interpreter
- arguments
- variadicAsArray
- if true then the variadic arguments are returned as a Java array, otherwise as a
ListHoldervariadicArgAsList
- if true
, the variadic argument is given as an expression
returning a list; if false
, the variadic argument
is given as several individual expressionsstackTrace
- ErrorException
public Namespace createFunctionNamespace(Interpreter interpreter, List<Expression> arguments, boolean variadicAsList, InterpreterStackTrace stackTrace) throws ErrorException
interpreter
- arguments
- variadicAsList
- stackTrace
- a stack traceErrorException
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.