Class FunctionLibrary<N>

java.lang.Object
eu.bandm.tools.tpath.runtime.FunctionLibrary<N>
Type Parameters:
N - the node type from which node set expressions are built. With built-in JAXP DOM, it is "org.w3c.dom.Node"
Direct Known Subclasses:
BuiltInFunctions, BuiltInFunctions

public class FunctionLibrary<N> extends Object
Infra-Structure for defining xpath functions, built-in as well as extensions. Includes methods for manipulating the function directory, plus call-back auxiliary functions for the type signature construction and check.
The data contained here plays a double role: it is needed for runtime execution, but also already in an earlier phase for type checking. This is possible by defining FunctionSignature already in the "type" package. The field functionTypes holds a function which is a projection to type information only (w/o implementation).
BuiltinFunctionSignature is an easy to use but restricted implmentation, sufficient for most cases and supported here with additional convenience factory and call-back methods.
Examples are BuiltInFunctions and BuiltInFunctions.
                              ---functions()--> NamespaceName->tpath.runtime.Function
              FunctionLibrary ---functionTypes()--> NamespaceName->FunctionSignature
                    /_\                                                /_\
                     |                                                  |
        +------------+-------------+                        BuiltinFunctionSignature
        |                          |
 tpath.runtime.BuiltInFunction     |
        ^                          |
        |____addAll()___  xslt.base.BuiltInFunctions      

  
This solution has been chosen for an easier and more consistent way of definition/maintanance.
FIXME type constant for "nodeset" result type !??!