Class FunctionLibrary

java.lang.Object
org.apache.commons.jxpath.FunctionLibrary
All Implemented Interfaces:
Functions

public class FunctionLibrary extends Object implements 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 Details Link icon

  • Method Details Link icon

    • addFunctions Link icon

      public void addFunctions(Functions functions)
      Add functions to the library
      Parameters:
      functions - to add
    • getFunction Link icon

      public Function getFunction(String namespace, String name, Object[] parameters)
      Gets a Function, if any, for the specified namespace, name and parameter types.
      Specified by:
      getFunction in interface Functions
      Parameters:
      namespace - function namespace
      name - function name
      parameters - parameters
      Returns:
      Function found
    • getUsedNamespaces Link icon

      Gets a set containing all namespaces used by the aggregated Functions.
      Specified by:
      getUsedNamespaces in interface Functions
      Returns:
      a set containing all namespaces used by the aggregated Functions.
    • removeFunctions Link icon

      public void removeFunctions(Functions functions)
      Removes functions from the library.
      Parameters:
      functions - to remove.