public interface FunctionInvoker
An interface for invoking Qilletni methods from Java code.
-
Method Summary
Modifier and TypeMethodDescription<T extends QilletniType>
Optional<T> invokeFunction(FunctionType alreadyFoundFunction, List<QilletniType> params) Invokes a function with the given parameters.<T extends QilletniType>
Optional<T> invokeFunction(FunctionType alreadyFoundFunction, List<QilletniType> params, QilletniType invokedOn) Invokes a function with the given parameters.<T extends QilletniType>
TinvokeFunctionWithResult(FunctionType alreadyFoundFunction, List<QilletniType> params) Invokes a function with the given parameters and returns the result, throwing if the function didn't return.<T extends QilletniType>
TinvokeFunctionWithResult(FunctionType alreadyFoundFunction, List<QilletniType> params, QilletniType invokedOn) Invokes a function with the given parameters and returns the result, throwing if the function didn't return.
-
Method Details
-
invokeFunction
<T extends QilletniType> Optional<T> invokeFunction(FunctionType alreadyFoundFunction, List<QilletniType> params) Invokes a function with the given parameters.- Type Parameters:
T- The type of the result- Parameters:
alreadyFoundFunction- The function to invokeparams- The parameters to pass to the function- Returns:
- The result of the function, if any
-
invokeFunction
<T extends QilletniType> Optional<T> invokeFunction(FunctionType alreadyFoundFunction, List<QilletniType> params, QilletniType invokedOn) Invokes a function with the given parameters.- Type Parameters:
T- The type of the result- Parameters:
alreadyFoundFunction- The function to invokeparams- The parameters to pass to the functioninvokedOn- The type this was invoked on, if an extension method- Returns:
- The result of the function, if any
-
invokeFunctionWithResult
<T extends QilletniType> T invokeFunctionWithResult(FunctionType alreadyFoundFunction, List<QilletniType> params) Invokes a function with the given parameters and returns the result, throwing if the function didn't return.- Type Parameters:
T- The type of the result- Parameters:
alreadyFoundFunction- The function to invokeparams- The parameters to pass to the function- Returns:
- The result of the function
-
invokeFunctionWithResult
<T extends QilletniType> T invokeFunctionWithResult(FunctionType alreadyFoundFunction, List<QilletniType> params, QilletniType invokedOn) Invokes a function with the given parameters and returns the result, throwing if the function didn't return.- Type Parameters:
T- The type of the result- Parameters:
alreadyFoundFunction- The function to invokeparams- The parameters to pass to the functioninvokedOn- The type this was invoked on, if an extension method- Returns:
- The result of the function
-