com.saxonica.functions.extfn

## Class ExtraFunctionLibrary

- java.lang.Object
- - net.sf.saxon.functions.IntegratedFunctionLibrary
  - - net.sf.saxon.functions.VendorFunctionLibrary
    - - com.saxonica.functions.extfn.ExtraFunctionLibrary

- All Implemented Interfaces:
    Serializable, FunctionLibrary

      public class ExtraFunctionLibrary
      extends VendorFunctionLibrary

  The ExtraFunctionLibrary represents additions to the set of Saxon vendor-supplied extension functions that are available only with the Saxon-PE and Saxon-EE editions
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ExtraFunctionLibrary(Configuration config)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Expression` | `bind(StructuredQName functionName, int arity, Expression[] staticArgs, StaticContext env, Container container)` Bind an extension function, given the URI and local parts of the function name, and the list of expressions supplied as arguments.
    `FunctionLibrary` | `copy()` This method creates a copy of a FunctionLibrary: if the original FunctionLibrary allows new functions to be added, then additions to this copy will not affect the original, or vice versa.
    `protected void` | `init(Configuration config)` Initialize the set of functions available

    - ### Methods inherited from class net.sf.saxon.functions.VendorFunctionLibrary

      `init, makeSaxonFunction`

    - ### Methods inherited from class net.sf.saxon.functions.IntegratedFunctionLibrary

      `getFunctionItem, isAvailable, makeFunctionCall, registerFunction`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ExtraFunctionLibrary

          public ExtraFunctionLibrary(Configuration config)

  - ### Method Detail

    - #### init

          protected void init(Configuration config)

      Initialize the set of functions available

    - #### copy

          public FunctionLibrary copy()

      Description copied from class: `IntegratedFunctionLibrary`
      This method creates a copy of a FunctionLibrary: if the original FunctionLibrary allows new functions to be added, then additions to this copy will not affect the original, or vice versa.
      Specified by:
        `copy` in interface `FunctionLibrary`
      Overrides:
        `copy` in class `VendorFunctionLibrary`
      Returns:
        a copy of this function library. This must be an instance of the original class.

    - #### bind

          public Expression bind(StructuredQName functionName,
                        int arity,
                        Expression[] staticArgs,
                        StaticContext env,
                        Container container)
                          throws XPathException

      Bind an extension function, given the URI and local parts of the function name, and the list of expressions supplied as arguments. This method is called at compile time.
      Specified by:
        `bind` in interface `FunctionLibrary`
      Overrides:
        `bind` in class `IntegratedFunctionLibrary`
      Parameters:
        `functionName` - the name of the function
        `arity` -
        `staticArgs` - The expressions supplied statically in the function call. The intention is that the static type of the arguments (obtainable via getItemType() and getCardinality() may be used as part of the binding algorithm.
        `env` -
        `container` -
      Returns:
        An object representing the extension function to be called, if one is found; null if no extension function was found matching the required name and arity.
      Throws:
        `XPathException` - if a function is found with the required name and arity, but the implementation of the function cannot be loaded or used; or if an error occurs while searching for the function; or if this function library "owns" the namespace containing the function call, but no function was found.

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.