|
|||||||||
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 |
---|
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, WATCH_METHOD |
Constructor Summary | |
---|---|
ArithmeticExpression10(Expression p0,
int operator,
Expression p1)
Create an arithmetic expression to be evaluated in XPath 1.0 mode |
Method Summary | |
---|---|
SequenceIterator |
call(SequenceIterator[] arguments,
XPathContext context)
Evaluate the expression |
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,
ExpressionVisitor.ContextItemType contextItemType)
Type-check the expression statically. |
Methods inherited from class net.sf.saxon.expr.BinaryExpression |
---|
computeCardinality, computeSpecialProperties, displayOperator, equals, explain, explainExtraAttributes, getArguments, 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 |
Methods inherited from interface net.sf.saxon.expr.CallableExpression |
---|
getArguments |
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, ExpressionVisitor.ContextItemType 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 class Expression
context
- The context in which the expression is to be evaluated
XPathException
- if any dynamic error occurs evaluating the
expressionpublic SequenceIterator call(SequenceIterator[] arguments, XPathContext context) throws XPathException
call
in interface CallableExpression
arguments
- the values of the arguments, supplied as SequenceIteratorscontext
- the dynamic evaluation context
XPathException
- if a dynamic error occurs during the evaluation of the expression
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |