This method is called from the sitemap, using the syntax
<map:call function="..."/>
The method will execute the named function, which must be defined in the given language. There is no assumption made on how various arguments are passed to the function.
The params
argument is a List
object that contains Interpreter.Argument
instances, representing the parameters to be passed to the called function. An Argument
instance is a key-value pair, where the key is the name of the parameter, and the value is its desired value. Most languages will ignore the name value and simply pass to the function, in a positional order, the values of the argument. Some languages however can pass the arguments in a different order than the original prototype of the function. For these languages the ability to associate the actual argument with a formal parameter using its name is essential.
A particular language implementation may decide to put the environment, request, response etc. objects in the dynamic scope available to the function at the time of the call. Other implementations may decide to pass these as arguments to the called function.
The current implementation assumes the sitemap implementation is TreeProcessor.
@param funName a String
value, the name of thefunction to call
@param params a List
object whose components areCallFunctionNode.Argument instances. The interpretation of the parameters is left to the actual implementation of the interpreter.
@param env an Environment
value