Package net.sf.saxon.expr

## Class SystemFunctionCall.Optimized

- java.lang.Object
- - net.sf.saxon.expr.Expression
  - - net.sf.saxon.expr.FunctionCall
    - - net.sf.saxon.expr.StaticFunctionCall
      - - net.sf.saxon.expr.SystemFunctionCall
        - - net.sf.saxon.expr.SystemFunctionCall.Optimized

- All Implemented Interfaces:
    `Callable`, `ExportAgent`, `Locatable`, `Negatable`, `IdentityComparable`, `Traceable`
  Enclosing class:
    SystemFunctionCall

      public abstract static class SystemFunctionCall.Optimized
      extends SystemFunctionCall

  Subclass representing a system function call that has been optimized; this overrides the optimize() method to do nothing, thus ensuring that optimization converges.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class net.sf.saxon.expr.SystemFunctionCall

      `SystemFunctionCall.Optimized`

  - ### Field Summary

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

      `argumentEvaluators`

    - ### 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
    --- | ---
    `Optimized​(SystemFunction target, Expression[] arguments)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Expression` | `optimize​(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo)` | Perform optimisation of an expression and its subexpressions.

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

      `addToPathMap, allocateArgumentEvaluators, computeCardinality, computeSpecialProperties, copy, evaluateArguments, export, getExpressionName, getIntegerBounds, getIntrinsicDependencies, getItemType, getNetCost, getScopingExpression, getTargetFunction, isLiftable, isNegatable, isVacuousExpression, negate, preEvaluate, process, resetLocalStaticProperties, setRetainedStaticContext, toPattern, typeCheck, unordered`

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

      `call, getFunctionName, getStaticUType, getTargetFunction, isCallOn`

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

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

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

      `adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getInterpretedExpression, getLocalRetainedStaticContext, getLocation, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStreamerName, getTracingTag, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isEqual, isIdentical, isInstruction, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, prepareForStreaming, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, typeCheckChildren, typeError, 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

    - #### Optimized

          public Optimized​(SystemFunction target,
                           Expression[] arguments)

  - ### Method Detail

    - #### optimize

          public Expression optimize​(ExpressionVisitor visitor,
                                     ContextItemStaticInfo contextInfo)
                              throws XPathException

      Description copied from class: `FunctionCall`
      Perform optimisation of an expression and its subexpressions.

      This method is called after all references to functions and variables have been resolved to the declaration of the function or variable, and after all type checking has been done.

      Overrides:
        `optimize` in class `SystemFunctionCall`
      Parameters:
        `visitor` - an expression visitor
        `contextInfo` - the static type of "." at the point where this expression is invoked. The parameter is set to null if it is known statically that the context item will be undefined. If the type of the context item is not known statically, the argument is set to `Type.ITEM_TYPE`
      Returns:
        the original expression, rewritten if appropriate to optimize execution
      Throws:
        `XPathException` - if an error is discovered during this phase (typically a type error)