net.sf.saxon.expr
public class ArithmeticExpression10 extends BinaryExpression
ArithmeticExpression
for the non-backwards
compatible case.operand0, operand1, operator
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticProperties
Constructor and Description |
---|
ArithmeticExpression10(Expression p0,
int operator,
Expression p1)
Create an arithmetic expression to be evaluated in XPath 1.0 mode
|
Modifier and Type | Method and Description |
---|---|
Expression |
copy()
Copy an expression.
|
Item |
evaluateItem(XPathContext context)
Evaluate the expression.
|
ItemType |
getItemType(TypeHierarchy th)
Determine the data type of the expression, if this is known statically
|
boolean |
isBackwardsCompatible()
Determine whether the expression is to be evaluated in backwards-compatible mode
|
Expression |
typeCheck(ExpressionVisitor visitor,
ItemType contextItemType)
Type-check the expression statically.
|
computeCardinality, computeSpecialProperties, displayOperator, equals, explain, getOperands, getOperator, hashCode, isAssociative, isCommutative, isInverse, iterateSubExpressions, optimize, promote, replaceSubExpression, setFlattened, simplify, toString
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, display, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, 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, iterate, iterateEvents, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setFiltered, setLocationId, staticTypeCheck, suppressValidation, typeError
public ArithmeticExpression10(Expression p0, int operator, Expression p1)
p0
- the first operandoperator
- the operator, for example Token.PLUS
p1
- the second operandpublic boolean isBackwardsCompatible()
public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType) throws XPathException
typeCheck
in class BinaryExpression
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 to
Type.ITEM_TYPE
XPathException
- if an error is discovered during this phase
(typically a type error)public ItemType getItemType(TypeHierarchy th)
getItemType
in class Expression
th
- the type hierarchy cachepublic Expression copy()
copy
in class Expression
public Item evaluateItem(XPathContext context) throws XPathException
evaluateItem
in interface EvaluableItem
evaluateItem
in class Expression
context
- The context in which the expression is to be evaluatedXPathException
- if any dynamic error occurs evaluating the
expression