Class JavaExtensionLibrary.UnresolvedExtensionFunctionCall

java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.FunctionCall
com.saxonica.config.JavaExtensionLibrary.UnresolvedExtensionFunctionCall
All Implemented Interfaces:
Callable, ExportAgent, Locatable, IdentityComparable, Traceable
Enclosing class:
JavaExtensionLibrary

public class JavaExtensionLibrary.UnresolvedExtensionFunctionCall extends FunctionCall implements Callable
Inner class representing an unresolved extension function call. This arises when there is insufficient static type information available at the time the function call is parsed to determine which of several candidate Java methods to invoke. The function call cannot be executed; it must be resolved to an actual Java method during the analysis phase.
  • Constructor Details

  • Method Details

    • getFunctionName

      public StructuredQName getFunctionName()
      Get the qualified of the function being called
      Specified by:
      getFunctionName in class FunctionCall
      Returns:
      the qualified name
    • typeCheck

      public Expression typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException
      Type-check the expression.
      Overrides:
      typeCheck in class FunctionCall
      Parameters:
      visitor - an expression visitor
      contextInfo - Information available statically about the context item: whether it is (possibly) absent; its static type; its streaming posture.
      Returns:
      the original expression, rewritten to perform necessary run-time type checks, and to perform other type-related optimizations
      Throws:
      XPathException - if an error is discovered during this phase (typically a type error)
    • resolve

      public Expression resolve(SequenceType[] argTypes) throws XPathException
      Throws:
      XPathException
    • call

      public Sequence call(XPathContext context, Sequence[] arguments) throws XPathException
      Evaluate the expression
      Specified by:
      call in interface Callable
      Parameters:
      context - the dynamic evaluation context
      arguments - the values of the arguments, supplied as Sequences
      Returns:
      the result of the evaluation, in the form of a Sequence
      Throws:
      XPathException - if a dynamic error occurs during the evaluation of the expression
    • getTargetFunction

      public FunctionItem getTargetFunction(XPathContext context)
      Get the target function to be called
      Specified by:
      getTargetFunction in class FunctionCall
      Parameters:
      context - the dynamic evaluation context
      Returns:
      the target function
    • getItemType

      public ItemType getItemType()
      Determine the data type of the expression, if possible. All expression return sequences, in general; this method determines the type of the items within the sequence, assuming that (a) this is known in advance, and (b) it is the same for all items in the sequence.

      This method should always return a result, though it may be the best approximation that is available at the time.

      Specified by:
      getItemType in class Expression
      Returns:
      a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER, Type.NODE, or Type.ITEM (meaning not known at compile time)
    • computeCardinality

      protected int computeCardinality()
      Compute the static cardinality of this expression
      Specified by:
      computeCardinality in class Expression
      Returns:
      the computed cardinality, as one of the values StaticProperty.ALLOWS_ZERO_OR_ONE, StaticProperty.EXACTLY_ONE, StaticProperty.ALLOWS_ONE_OR_MORE, StaticProperty.ALLOWS_ZERO_OR_MORE
    • copy

      public Expression copy(RebindingMap rebindings)
      Copy an expression. This makes a deep copy.
      Specified by:
      copy in class Expression
      Parameters:
      rebindings - variables to be re-bound
      Returns:
      the copy of the original expression
    • getElaborator

      public Elaborator getElaborator()
      Make an elaborator for this expression
      Overrides:
      getElaborator in class Expression
      Returns:
      an appropriate Elaborator