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.- Version:
- $Revision: 652845 $ $Date: 2008-05-02 12:46:46 -0500 (Fri, 02 May 2008) $
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFunctions(Functions functions) Add functions to the librarygetFunction(String namespace, String name, Object[] parameters) Returns a Function, if any, for the specified namespace, name and parameter types.Returns a set containing all namespaces used by the aggregated Functions.private voidPrepare the cache.voidremoveFunctions(Functions functions) Remove functions from the library.
-
Field Details
-
allFunctions
-
byNamespace
-
-
Constructor Details
-
FunctionLibrary
public FunctionLibrary()
-
-
Method Details
-
addFunctions
Add functions to the library- Parameters:
functions- to add
-
removeFunctions
Remove functions from the library.- Parameters:
functions- to remove
-
getUsedNamespaces
Returns a set containing all namespaces used by the aggregated Functions.- Specified by:
getUsedNamespacesin interfaceFunctions- Returns:
- Set
-
getFunction
Returns 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
-
prepareCache
private void prepareCache()Prepare the cache.
-