Class Empty
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.FunctionCall
net.sf.saxon.functions.SystemFunction
net.sf.saxon.functions.Aggregate
net.sf.saxon.functions.Empty
- All Implemented Interfaces:
Serializable, SourceLocator, LocationProvider, SaxonLocator, InstructionInfo, Locator
-
Field Summary
Fields inherited from class SystemFunction
operationFields inherited from class FunctionCall
argument -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanEvaluate the function in a boolean contextevaluateItem(XPathContext context) Evaluate the functionintAn implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().booleanisNegatable(ExpressionVisitor visitor) Check whether this specific instance of the expression is negatablenegate()Return the negation of the expressionoptimize(ExpressionVisitor visitor, ExpressionVisitor.ContextItemType contextItemType) Perform optimisation of an expression and its subexpressions.Methods inherited from class Aggregate
checkArgumentsMethods inherited from class SystemFunction
addContextDocumentArgument, addDocToPathMap, computeCardinality, computeSpecialProperties, copy, equals, getDetails, getErrorCodeForTypeErrors, getItemType, getOperation, getRequiredType, makeSystemFunction, setDetails, useContextItemAsDefaultMethods inherited from class FunctionCall
addExternalFunctionCallToPathMap, checkArgumentCount, explain, getArguments, getDisplayName, getExpressionName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionName, simplify, simplifyArguments, toString, typeCheckMethods inherited from class Expression
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getEvaluationMethod, getExecutable, getHostLanguage, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterate, iterateEvents, iterateSameFocusSubExpressions, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, typeError
-
Constructor Details
-
Empty
public Empty()
-
-
Method Details
-
getImplementationMethod
public int getImplementationMethod()Description copied from class:SystemFunctionAn implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process(). This method indicates which of these methods is provided directly. The other methods will always be available indirectly, using an implementation that relies on one of the other methods.- Overrides:
getImplementationMethodin classSystemFunction- Returns:
- the implementation method, for example
Expression.ITERATE_METHODorExpression.EVALUATE_METHODorExpression.PROCESS_METHOD
-
isNegatable
Check whether this specific instance of the expression is negatable- Returns:
- true if it is
-
negate
Return the negation of the expression- Returns:
- the negation of the expression
-
optimize
public Expression optimize(ExpressionVisitor visitor, ExpressionVisitor.ContextItemType contextItemType) throws XPathException 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:
optimizein classSystemFunction- Parameters:
visitor- an expression visitorcontextItemType- 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 toType.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)
-
evaluateItem
Evaluate the function- Overrides:
evaluateItemin classExpression- Parameters:
context- The context in which the expression is to be evaluated- Returns:
- the node or atomic value that results from evaluating the expression; or null to indicate that the result is an empty sequence
- Throws:
XPathException- if any dynamic error occurs evaluating the expression
-
effectiveBooleanValue
Evaluate the function in a boolean context- Overrides:
effectiveBooleanValuein classExpression- Parameters:
c- The context in which the expression is to be evaluated- Returns:
- the effective boolean value
- Throws:
XPathException- if any dynamic error occurs evaluating the expression
-