- 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 theFunctionArgument
annotation. If no argument converter is specified for an argument,DefaultArgumentConverter
is 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 Object
invoke(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:FunctionInvoker
Invokes a method to return a ScalarValuedFunction, using the given arguments.- Specified by:
invoke
in 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:
IllegalArgumentException
IllegalAccessException
InvocationTargetException
-
-