Package 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:
java.io.Serializable
,javax.xml.transform.SourceLocator
,LocationProvider
,SaxonLocator
,EvaluableItem
,SequenceIterable
,InstructionInfo
,org.xml.sax.Locator
public class Reverse extends SystemFunction
Implement XPath function fn:reverse()- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class net.sf.saxon.functions.SystemFunction
operation
-
Fields inherited from class net.sf.saxon.expr.FunctionCall
argument
-
Fields inherited from class net.sf.saxon.expr.Expression
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticProperties
-
-
Constructor Summary
Constructors Constructor Description Reverse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeSpecialProperties()
Determine the special properties of this expression.boolean
effectiveBooleanValue(XPathContext context)
Get the effective boolean value of the expression.ItemType
getItemType(TypeHierarchy th)
Determine the item type of the value returned by the functionSequenceIterator
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence.-
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, display, doPromotion, dynamicError, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, findParentOf, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isUpdatingExpression, iterateEvents, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, typeError
-
-
-
-
Method Detail
-
getItemType
public ItemType getItemType(TypeHierarchy th)
Determine the item type of the value returned by the function- Overrides:
getItemType
in classSystemFunction
- 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 classSystemFunction
- 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 interfaceSequenceIterable
- Overrides:
iterate
in classExpression
- 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 classExpression
- 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
-
-