Class AbstractFunctionFactory
java.lang.Object
com.inductiveautomation.ignition.common.expressions.AbstractFunctionFactory
- All Implemented Interfaces:
FunctionFactory
- Direct Known Subclasses:
BasicFunctionFactory
,ClientFunctionFactory
,DefaultFunctionFactory
,FSQLFunctionFactory
,PropertyBasedFunctionFactory
,TagFunctionFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addFunction
(String name, String category, Function f) protected void
addFunction
(String name, String category, Function f, boolean visible) Return a sequence of categories to organize functions.getFunction
(String name) Retrieves the function with the given name.Returns a set of all function names.getFunctionsInCategory
(String name) Returns a Set of function names for all of the functions in the given category.
-
Field Details
-
parent
-
functions
-
categories
-
-
Constructor Details
-
AbstractFunctionFactory
-
-
Method Details
-
addFunction
- Throws:
IllegalArgumentException
-
addFunction
protected void addFunction(String name, String category, Function f, boolean visible) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
getFunction
Retrieves the function with the given name. Returns a copy of that function, so that each FunctionExpression can have its own version of the function. NB - some functions may opt to not create a true copy, it depends on the serialization requirements of the function.- Specified by:
getFunction
in interfaceFunctionFactory
- Returns:
- The function, or null
-
getCategories
Description copied from interface:FunctionFactory
Return a sequence of categories to organize functions. Used to generate the popup menu in the designer. Will automatically organize into submenus based on forward-slash in path.- Specified by:
getCategories
in interfaceFunctionFactory
-
getFunctionsInCategory
Returns a Set of function names for all of the functions in the given category. If there are no functions in the given category, or the category doesn't exist, an empty set is returned.- Specified by:
getFunctionsInCategory
in interfaceFunctionFactory
-
getFunctionNames
Returns a set of all function names.- Specified by:
getFunctionNames
in interfaceFunctionFactory
-