Interface XPathFunctionDefinition.FunctionCall

  • Enclosing class:
    XPathFunctionDefinition

    public static interface XPathFunctionDefinition.FunctionCall
    Provides the actual implementation of a custom XPath function.
    • Method Detail

      • staticInit

        default void staticInit​(Object[] arguments)
                         throws XPathFunctionException
        This is called once before the function is evaluated. It can be used to optimize the implementation by doing expensive operations only once and cache the result. This is useful, if the argument of the function is of type String and is provided as a String literal in the XPath expression.

        This is an optional step. The default implementation does nothing.

        Parameters:
        arguments - The arguments converted as the corresponding java types. See XPathFunctionDefinition.getArgumentTypes(). Note: This array might contain null elements, if the values are not known yet because they are dynamic. Only literal values are available.
        Throws:
        XPathFunctionException - when any problem during initialization occurs, like invalid arguments.