Class UserFunctionReference.BoundUserFunction

  • All Implemented Interfaces:
    Callable, ContextOriginator, Function, GroundedValue, Item, Sequence
    Enclosing class:

    public static class UserFunctionReference.BoundUserFunction
    extends AbstractFunction
    implements ContextOriginator
    A BoundUserFunction represents a user-defined function seen as a component. A single source-level XSLT function may be the actor in several different components (in different stylesheet packages). Although the code of the function is identical in each case, the bindings to other stylesheet components may be different.
    • Method Detail

      • getTargetFunction

        public Function getTargetFunction()
      • getController

        public Controller getController()
      • makeNewContext

        public XPathContext makeNewContext​(XPathContext oldContext,
                                           ContextOriginator originator)
        Description copied from class: AbstractFunction
        Prepare an XPathContext object for evaluating the function
        Specified by:
        makeNewContext in interface Function
        makeNewContext in class AbstractFunction
        oldContext - the XPathContext of the function calling expression
        originator - identifies the location of the caller for diagnostics
        a suitable context for evaluating the function (which may or may not be the same as the caller's context)
      • call

        public Sequence call​(XPathContext context,
                             Sequence[] args)
                      throws XPathException
        Description copied from interface: Function
        Invoke the function
        Specified by:
        call in interface Callable
        Specified by:
        call in interface Function
        context - the XPath dynamic evaluation context
        args - the actual arguments to be supplied
        the result of invoking the function
        XPathException - if a dynamic error occurs within the function
      • getFunctionName

        public StructuredQName getFunctionName()
        Description copied from interface: Function
        Get the name of the function, or null if it is anonymous
        Specified by:
        getFunctionName in interface Function
        the function name, or null for an anonymous inline function
      • getArity

        public int getArity()
        Description copied from interface: Function
        Get the arity of the function
        Specified by:
        getArity in interface Function
        the number of arguments in the function signature
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: Function
        Get a description of this function for use in error messages. For named functions, the description is the function name (as a lexical QName). For others, it might be, for example, "inline function", or "partially-applied ends-with function".
        Specified by:
        getDescription in interface Function
        a description of the function for use in error messages