- java.lang.Object
-
- com.pervasive.datarush.functions.DefaultFunctionInvoker
-
- All Implemented Interfaces:
FunctionInvoker
public class DefaultFunctionInvoker extends Object implements FunctionInvoker
A default function invoker, which passes arguments directly to the method using anArgumentConverter.
Arguments may specify a converter using theFunctionArgumentannotation. If no argument converter is specified for an argument,DefaultArgumentConverteris used.
If the number of arguments does not match the method's expected number of arguments, an IllegalArgumentException is thrown.
-
-
Constructor Summary
Constructors Constructor Description DefaultFunctionInvoker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectinvoke(Method m, ScalarValuedFunction[] args)Invokes a method to return a ScalarValuedFunction, using the given arguments.
-
-
-
Method Detail
-
invoke
public Object invoke(Method m, ScalarValuedFunction[] args) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
Description copied from interface:FunctionInvokerInvokes a method to return a ScalarValuedFunction, using the given arguments.- Specified by:
invokein interfaceFunctionInvoker- Parameters:
m- The method to invoke.args- The ScalarValuedFunction arguments from the call to the FunctionRegistry.- Returns:
- The ScalarValuedFunction or Aggregation returned by invoking the method.
- Throws:
IllegalArgumentExceptionIllegalAccessExceptionInvocationTargetException
-
-