- java.lang.Object
-
- com.pervasive.datarush.functions.FunctionRegistry
-
public class FunctionRegistry extends Object
Stores a list of functions registered by the FunctionTypeResoultionProvider, and provides a method for calling those functions.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ScalarValuedFunction
getFunction(String name, ScalarValuedFunction[] arguments)
Invoke a ScalarValuedFunction by name, using the supplied arguments.FunctionDescription
getFunctionDescription(String name, int argCount)
Create a FunctionDescription for a given function.Collection<FunctionDescription>
getFunctionDescriptions()
Return a list of descriptions of all available functions.Map<String,Collection<FunctionDescription>>
getFunctionDescriptionsByCategory()
Returns a list of descriptions of all available functions, organized by category.static FunctionRegistry
getInstance()
Get an instance of the FunctionRegistry.
-
-
-
Method Detail
-
getInstance
public static FunctionRegistry getInstance()
Get an instance of the FunctionRegistry.- Returns:
- An instance of the FunctionRegistry
-
getFunction
public ScalarValuedFunction getFunction(String name, ScalarValuedFunction[] arguments)
Invoke a ScalarValuedFunction by name, using the supplied arguments.- Parameters:
name
- The registered name of the function.arguments
- The arguments to pass to the function.- Returns:
- The ScalarValuedFunction.
-
getFunctionDescriptions
public Collection<FunctionDescription> getFunctionDescriptions()
Return a list of descriptions of all available functions.- Returns:
-
getFunctionDescriptionsByCategory
public Map<String,Collection<FunctionDescription>> getFunctionDescriptionsByCategory()
Returns a list of descriptions of all available functions, organized by category.- Returns:
-
getFunctionDescription
public FunctionDescription getFunctionDescription(String name, int argCount)
Create a FunctionDescription for a given function.- Parameters:
name
- The name of the functionargCount
- The number of arguments the function takes- Returns:
- The FunctionDescription of the function
-
-