public abstract class MappedEvaluatorFactory extends Object implements EvaluatorFactory
ReflectiveFactory| Modifier and Type | Class and Description |
|---|---|
static class |
MappedEvaluatorFactory.Mapping
Defines a mapping between data type and an evaluator class.
|
| Modifier | Constructor and Description |
|---|---|
protected |
MappedEvaluatorFactory()
Creates a factory with no mapping.
|
protected |
MappedEvaluatorFactory(MappedEvaluatorFactory.Mapping... mappings)
Creates a factory using the supplied mappings.
|
| Modifier and Type | Method and Description |
|---|---|
FunctionEvaluator |
contructEvaluator(ScalarSettable result,
Object[] arguments)
Construct a new evaluator for the associated function with the
given arguments, bound to the specified output buffer.
|
protected abstract ScalarTokenType |
getDispatchType(ScalarSettable result,
Object[] arguments)
Determines the type to use to select the evaluator.
|
static MappedEvaluatorFactory.Mapping |
use(ScalarTokenType type,
Class<? extends FunctionEvaluator> evaluator)
Defines the evaluator class for a given type.
|
protected MappedEvaluatorFactory()
protected MappedEvaluatorFactory(MappedEvaluatorFactory.Mapping... mappings)
mappings - the type to evaluator mappings to usepublic static MappedEvaluatorFactory.Mapping use(ScalarTokenType type, Class<? extends FunctionEvaluator> evaluator)
type - the token type for which to define a mappingevaluator - the class of the evaluator to createprotected abstract ScalarTokenType getDispatchType(ScalarSettable result, Object[] arguments)
result - the result buffer for the functionarguments - the arguments to the functionpublic FunctionEvaluator contructEvaluator(ScalarSettable result, Object[] arguments)
EvaluatorFactorycontructEvaluator in interface EvaluatorFactoryresult - the buffer to which the function result is writtenarguments - the arguments to the functionCopyright © 2020 Actian Corporation. All rights reserved.