Class UtilFunctionExecutorImpl
java.lang.Object
io.higson.runtime.builtin.executor.UtilFunctionExecutorImpl
- All Implemented Interfaces:
UtilFunctionExecutor
Utility function executor is a helper class for executing utility functions.
It consists of built-in functions.
Includes a map of function implementations, where key is the method name and value is the function implementation instance. It also includes the type converter to convert different types of input to the expected type.
Makes use of two indexes to manage function arguments - one for rest arguments and one for path arguments.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(String functionCode, HigsonContext ctx, Object[] args) Executes the given utility function given a function code, a context, and a set of arguments.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
UtilFunctionExecutorImpl
public UtilFunctionExecutorImpl()
-
-
Method Details
-
execute
Description copied from interface:UtilFunctionExecutorExecutes the given utility function given a function code, a context, and a set of arguments.- Specified by:
executein interfaceUtilFunctionExecutor- Parameters:
functionCode- The utility function to be executed.ctx- The context in which the function is executed.args- The arguments provided for the utility function.- Returns:
- the result of the utility function execution.
-
supportedFunctions
- Specified by:
supportedFunctionsin interfaceUtilFunctionExecutor
-