Search
IExpressionEvaluator.invokeFunction Method
See Also
 






Invokes the function with the specified name and parameters.

Namespace: com.mindfusion.spreadsheet.expressions
Package: com.mindfusion.spreadsheet.expressions

 Syntax

Java  Copy Code

Object invokeFunction (
    IExpressionEvaluatorContext context,
    String name,
    List<?> parameters
)

 Parameters

context

A helper object that can be used to obtain error values, invoke predefined functions, and so on.

name

The name of the function.

parameters

The function parameters.

 Return Value

A Boolean, Double, String, DateTime, or Duration value, or an error received by calling the IExpressionEvaluatorContext.getError method. Any other value will be interpreted as the function not being invoked.

 Remarks

To interpret a parameter as a CLR value, pass the parameter to one of the following methods of the supplied IExpressionEvaluatorContext object: IExpressionEvaluatorContext.toDouble, IExpressionEvaluatorContext.toString, IExpressionEvaluatorContext.toBool, IExpressionEvaluatorContext.toDateTime, or IExpressionEvaluatorContext.toTimeSpan. The context will attempt to convert the parameter to the desired type and returns null if unsuccessful. To check if a parameter is an error, call the ISERROR function of the core evaluator.

 See Also