net.sf.saxon.functions
Class Reverse
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.FunctionCall
net.sf.saxon.functions.SystemFunction
net.sf.saxon.functions.Reverse
- All Implemented Interfaces:
- Serializable, SourceLocator, LocationProvider, SaxonLocator, EvaluableItem, SequenceIterable, InstructionInfo, Locator
public class Reverse
- extends SystemFunction
Implement XPath function fn:reverse()
- See Also:
- Serialized Form
Methods inherited from class net.sf.saxon.functions.SystemFunction |
addContextDocumentArgument, addDocToPathMap, checkArguments, computeCardinality, copy, getDetails, getErrorCodeForTypeErrors, getRequiredType, makeSystemFunction, optimize, setDetails, useContextItemAsDefault |
Methods inherited from class net.sf.saxon.expr.FunctionCall |
addExternalFunctionCallToPathMap, checkArgumentCount, equals, explain, getArguments, getDisplayName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionName, simplify, simplifyArguments, toString, typeCheck |
Methods inherited from class net.sf.saxon.expr.Expression |
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, iterateSameFocusSubExpressions, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, typeError |
Reverse
public Reverse()
getItemType
public ItemType getItemType(TypeHierarchy th)
- Determine the item type of the value returned by the function
- Overrides:
getItemType
in class SystemFunction
- Parameters:
th
- the type hierarchy cache
- Returns:
- a value such as Type.STRING, Type.BOOLEAN, Type.NUMBER,
Type.NODE, or Type.ITEM (meaning not known at compile time)
computeSpecialProperties
public int computeSpecialProperties()
- Description copied from class:
SystemFunction
- Determine the special properties of this expression. The general rule
is that a system function call is non-creative if its return type is
atomic, or if all its arguments are non-creative. This is overridden
for the generate-id() function, which is considered creative if
its operand is creative (because the result depends on the
identity of the operand)
- Overrides:
computeSpecialProperties
in class SystemFunction
- Returns:
- the special properties, as a bit-significant integer
iterate
public SequenceIterator iterate(XPathContext context)
throws XPathException
- Description copied from class:
Expression
- Return an Iterator to iterate over the values of a sequence. The value of every
expression can be regarded as a sequence, so this method is supported for all
expressions. This default implementation handles iteration for expressions that
return singleton values: for non-singleton expressions, the subclass must
provide its own implementation.
- Specified by:
iterate
in interface SequenceIterable
- Overrides:
iterate
in class Expression
- Parameters:
context
- supplies the context for evaluation
- Returns:
- a SequenceIterator that can be used to iterate over the result
of the expression
- Throws:
XPathException
- if any dynamic error occurs evaluating the
expression
effectiveBooleanValue
public boolean effectiveBooleanValue(XPathContext context)
throws XPathException
- Description copied from class:
Expression
- Get the effective boolean value of the expression. This returns false if the value
is the empty sequence, a zero-length string, a number equal to zero, or the boolean
false. Otherwise it returns true.
- Overrides:
effectiveBooleanValue
in class Expression
- Parameters:
context
- 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
Copyright (c) Saxonica Limited. All rights reserved.