java.lang.Object
com.pervasive.datarush.functions.ReflectiveFactory
- All Implemented Interfaces:
EvaluatorFactory
A factory creating a fixed class of function evaluator. Construction is done
via reflection. To be usable with this factory, the evaluator class must:
- Define a single constructor.
- Take a
ScalarSettableor subclass object as the first argument as the result buffer. - Take the function arguments in the order they were declared in
the function description. (
ScalarFunctionDescriptor. Varargs are supported with either an array (or vararg) or list as the last argument.
-
Constructor Summary
ConstructorsConstructorDescriptionReflectiveFactory(Class<? extends FunctionEvaluator> clazz) Defines a factory creating evaluators of the specified class. -
Method Summary
Modifier and TypeMethodDescriptioncontructEvaluator(ScalarSettable result, Object[] arguments) Construct a new evaluator for the associated function with the given arguments, bound to the specified output buffer.
-
Constructor Details
-
ReflectiveFactory
Defines a factory creating evaluators of the specified class.- Parameters:
evaluator- the class of the evaluator to create
-
-
Method Details
-
contructEvaluator
Description copied from interface:EvaluatorFactoryConstruct a new evaluator for the associated function with the given arguments, bound to the specified output buffer.- Specified by:
contructEvaluatorin interfaceEvaluatorFactory- Parameters:
result- the buffer to which the function result is writtenarguments- the arguments to the function- Returns:
- a new evaluator for the function
-