Package org.apache.commons.jxpath
Class FunctionLibrary
java.lang.Object
org.apache.commons.jxpath.FunctionLibrary
- All Implemented Interfaces:
Functions
An object that aggregates
Functions objects into a group Functions object. Since JXPathContext can only register a single Functions object,
FunctionLibrary should always be used to group all Functions objects that need to be registered.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFunctions(Functions functions) Add functions to the librarygetFunction(String namespace, String name, Object[] parameters) Gets a Function, if any, for the specified namespace, name and parameter types.Gets a set containing all namespaces used by the aggregated Functions.voidremoveFunctions(Functions functions) Removes functions from the library.
-
Constructor Details
-
FunctionLibrary
public FunctionLibrary()Constructs a new instance.
-
-
Method Details
-
addFunctions
Add functions to the library- Parameters:
functions- to add
-
getFunction
Gets a Function, if any, for the specified namespace, name and parameter types.- Specified by:
getFunctionin interfaceFunctions- Parameters:
namespace- function namespacename- function nameparameters- parameters- Returns:
- Function found
-
getUsedNamespaces
Gets a set containing all namespaces used by the aggregated Functions.- Specified by:
getUsedNamespacesin interfaceFunctions- Returns:
- a set containing all namespaces used by the aggregated Functions.
-
removeFunctions
Removes functions from the library.- Parameters:
functions- to remove.
-