|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.saxon.expr.ComputedExpression | +--net.sf.saxon.expr.IsLastExpression
A position() eq last() expression, generated by the optimizer.
Field Summary |
Fields inherited from class net.sf.saxon.expr.ComputedExpression |
lineNumber, NO_ARGUMENTS, staticProperties |
Constructor Summary | |
IsLastExpression(boolean condition)
Construct a condition that tests position() eq last() (if condition is true) or position() ne last() (if condition is false). |
Method Summary | |
Expression |
analyze(StaticContext env)
Perform static analysis of an expression and its subexpressions. |
int |
computeCardinality()
Determine the static cardinality |
void |
display(int level,
NamePool pool)
Diagnostic print of expression structure |
Item |
evaluateItem(XPathContext c)
Evaluate an expression as a single item. |
boolean |
getCondition()
|
int |
getIntrinsicDependencies()
Get the dependencies of this expression on the context |
ItemType |
getItemType()
Determine the data type of the expression |
Expression |
simplify()
Simplify an expression. |
Methods inherited from class net.sf.saxon.expr.ComputedExpression |
computeDependencies, computeSpecialProperties, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, getCardinality, getDependencies, getLineNumber, getSourceLocator, getSpecialProperties, getSubExpressions, iterate, markTailFunctionCalls, promote, setLineNumber, typeError |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IsLastExpression(boolean condition)
Method Detail |
public boolean getCondition()
public Expression simplify()
ComputedExpression
simplify
in interface Expression
simplify
in class ComputedExpression
public Expression analyze(StaticContext env)
Expression
This checks statically that the operands of the expression have the correct type; if necessary it generates code to do run-time type checking or type conversion. A static type error is reported only if execution cannot possibly succeed, that is, if a run-time type error is inevitable. The call may return a modified form of the expression.
This method is called after all references to functions and variables have been resolved to the declaration of the function or variable. However, the types of such functions and variables will only be accurately known if they have been explicitly declared.
env
- the static context of the expression
public Item evaluateItem(XPathContext c) throws XPathException
ComputedExpression
evaluateItem
in interface Expression
evaluateItem
in class ComputedExpression
c
- The context in which the expression is to be evaluated
XPathException
- if any dynamic error occurs evaluating the
expressionpublic ItemType getItemType()
public int computeCardinality()
computeCardinality
in class ComputedExpression
public int getIntrinsicDependencies()
getIntrinsicDependencies
in class ComputedExpression
public void display(int level, NamePool pool)
level
- indentation level for this expression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |