|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.expr.Expression net.sf.saxon.expr.BinaryExpression net.sf.saxon.expr.ArithmeticExpression10
public class ArithmeticExpression10
Arithmetic Expression: an expression using one of the operators
plus, minus, multiply, div, idiv, mod, in backwards
compatibility mode: see ArithmeticExpression
for the non-backwards
compatible case.
Field Summary |
---|
Fields inherited from class net.sf.saxon.expr.BinaryExpression |
---|
operand0, operand1, operator |
Fields inherited from class net.sf.saxon.expr.Expression |
---|
EVALUATE_METHOD, ITERATE_METHOD, locationId, PROCESS_METHOD, staticProperties |
Constructor Summary | |
---|---|
ArithmeticExpression10(Expression p0,
int operator,
Expression p1)
Create an arithmetic expression to be evaluated in XPath 1.0 mode |
Method Summary | |
---|---|
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. |
Methods inherited from class net.sf.saxon.expr.BinaryExpression |
---|
computeCardinality, computeSpecialProperties, displayOperator, equals, explain, explainExtraAttributes, getOperands, getOperator, hashCode, isAssociative, isCommutative, isInverse, iterateSubExpressions, optimize, promote, replaceSubExpression, setFlattened, simplify, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ArithmeticExpression10(Expression p0, int operator, Expression p1)
p0
- the first operandoperator
- the operator, for example Token.PLUS
p1
- the second operandMethod Detail |
---|
public 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 cache
public 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 evaluated
XPathException
- if any dynamic error occurs evaluating the
expression
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |