FunctionLookup
public abstract class FunctionFactory extends java.lang.Object implements FunctionLookup
Modifier and Type | Class | Description |
---|---|---|
protected class |
FunctionFactory.FF_FunctionInfo |
An implementation of FunctionInfo.
|
Modifier and Type | Field | Description |
---|---|---|
static Expression[] |
GLOB_LIST |
Represents a function argument * for glob's such as 'count(*)'
|
Constructor | Description |
---|---|
FunctionFactory() |
Constructs the FunctionFactory.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
addFunction(java.lang.String fun_name,
java.lang.Class fun_class) |
Adds a new static function to this factory.
|
protected void |
addFunction(java.lang.String fun_name,
java.lang.Class fun_class,
int fun_type) |
Adds a new function to this factory.
|
protected boolean |
functionDefined(java.lang.String fun_name) |
Returns true if the function name is defined in this factory.
|
Function |
generateFunction(FunctionDef function_def) |
Creates a Function object for the function with the given name with the
given arguments.
|
FunctionInfo[] |
getAllFunctionInfo() |
Returns the list of all function names that this FunctionFactory manages.
|
FunctionInfo |
getFunctionInfo(java.lang.String fun_name) |
Returns a FunctionInfo instance of the function with the given name that
this FunctionFactory manages.
|
abstract void |
init() |
Initializes this FunctionFactory.
|
boolean |
isAggregate(FunctionDef function_def) |
Returns true if the function defined by FunctionDef is an aggregate
function, or false otherwise.
|
protected void |
removeFunction(java.lang.String fun_name) |
Removes a static function from this factory.
|
public static final Expression[] GLOB_LIST
protected void addFunction(java.lang.String fun_name, java.lang.Class fun_class, int fun_type)
fun_name
- the name of the function (eg. 'sum', 'concat').fun_class
- the Function class that we instantiate for this function.fun_type
- that type of function (either FunctionInfo.STATIC,
FunctionInfo.AGGREGATE, FunctionInfo.STATE_BASED).protected void addFunction(java.lang.String fun_name, java.lang.Class fun_class)
protected void removeFunction(java.lang.String fun_name)
protected boolean functionDefined(java.lang.String fun_name)
public abstract void init()
public Function generateFunction(FunctionDef function_def)
generateFunction
in interface FunctionLookup
public boolean isAggregate(FunctionDef function_def)
isAggregate
in interface FunctionLookup
public FunctionInfo getFunctionInfo(java.lang.String fun_name)
public FunctionInfo[] getAllFunctionInfo()
Copyright © 2018. All rights reserved.