Package com.saxonica.config

## 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.

- - ### Field Summary

    - ### Fields inherited from class net.sf.saxon.expr.Expression

      `EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_COST, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `UnresolvedExtensionFunctionCall​(StructuredQName functionName, java.lang.Class theClass, java.util.List<java.lang.reflect.AccessibleObject> candidateMethods, Expression[] staticArgs, Configuration config, boolean debug)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Sequence` | `call​(XPathContext context, Sequence[] arguments)` | Evaluate the expression
    `protected int` | `computeCardinality()` | Compute the static cardinality of this expression
    `Expression` | `copy​(RebindingMap rebindings)` | Copy an expression.
    `StructuredQName` | `getFunctionName()` | Get the qualified of the function being called
    `ItemType` | `getItemType()` | Determine the data type of the expression, if possible.
    `Function` | `getTargetFunction​(XPathContext context)` | Get the target function to be called
    `Expression` | `resolve​(SequenceType[] argTypes)` |
    `Expression` | `typeCheck​(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo)` | Type-check the expression.

    - ### Methods inherited from class net.sf.saxon.expr.FunctionCall

      `addExternalFunctionCallToPathMap, adjustRequiredType, checkArgumentCount, checkArguments, checkFunctionCall, computeHashCode, equals, evaluateArguments, export, getArg, getArguments, getArity, getDisplayName, getExpressionName, getImplementationMethod, getNetCost, getOperanda, iterate, operands, optimize, pluralArguments, preEvaluate, preEvaluateIfConstant, setArg, setArguments, setOperanda, setOperanda, simplifyArguments, toShortString, toString`

    - ### Methods inherited from class net.sf.saxon.expr.Expression

      `addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeSpecialProperties, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getIntegerBounds, getInterpretedExpression, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, getStreamerName, getTracingTag, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isInstruction, isLiftable, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, prepareForStreaming, process, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, typeCheckChildren, typeError, unordered, verifyParentPointers`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface net.sf.saxon.trace.Traceable

      `gatherProperties`

- - ### Constructor Detail

    - #### UnresolvedExtensionFunctionCall

          public UnresolvedExtensionFunctionCall​(StructuredQName functionName,
                                                 java.lang.Class theClass,
                                                 java.util.List<java.lang.reflect.AccessibleObject> candidateMethods,
                                                 Expression[] staticArgs,
                                                 Configuration config,
                                                 boolean debug)

  - ### Method Detail

    - #### 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 Function 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