|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.instruct.Instruction
net.sf.saxon.instruct.ExprInstruction
public abstract class ExprInstruction
This class is an abstract superclass for Instructions that also behave as Expressions. Currently this is restricted to those instructions used when an XQuery query is compiled. Eventually it is intended that all instructions should support the Expression interface. Note that the Expression interfaces (e.g. iterate()) may only be used on an ExprInstruction if all its child instructions are also instances of ExprInstruction.
Field Summary |
---|
Fields inherited from class net.sf.saxon.instruct.Instruction |
---|
children |
Constructor Summary | |
---|---|
ExprInstruction()
|
Method Summary | |
---|---|
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value of the expression. |
String |
evaluateAsString(XPathContext context)
Evaluate an expression as a String. |
Item |
evaluateItem(XPathContext context)
Evaluate an expression as a single item. |
int |
getCardinality()
Determine the static cardinality of the expression. |
int |
getDependencies()
Determine which aspects of the context the expression depends on. |
ItemType |
getItemType()
Determine the data type of the expression, if possible. |
int |
getSpecialProperties()
Get the static properties of this expression (other than its type). |
Expression[] |
getSubExpressions()
Get the immediate sub-expressions of this expression. |
protected abstract void |
getXPathExpressions(List list)
|
SequenceIterator |
iterate(XPathContext context)
Return an Iterator to iterate over the values of a sequence. |
Expression |
promote(PromotionOffer offer)
Offer promotion for this subexpression. |
protected abstract void |
promoteInst(PromotionOffer offer)
|
Expression |
simplify()
Simplify an expression. |
Methods inherited from class net.sf.saxon.instruct.Instruction |
---|
assembleParams, assembleTunnelParams, getChildren, getColumnNumber, getInstructionDetails, getInstructionName, getLineNumber, getPublicId, getResultType, getSystemId, getSystemId, process, processChildren, processChildrenLeavingTail, processLeavingTail, recoverableError, setChildren, setInstructionDetails, setSourceLocation, styleError, styleError |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.saxon.expr.Expression |
---|
analyze, display |
Constructor Detail |
---|
public ExprInstruction()
Method Detail |
---|
public Expression simplify() throws XPathException
Expression
simplify
in interface Expression
XPathException
- if an error is discovered during expression
rewritingpublic ItemType getItemType()
Expression
This method should always return a result, though it may be the best approximation that is available at the time.
getItemType
in interface Expression
public int getCardinality()
Expression
Determine the static cardinality of the expression. This establishes how many items there will be in the result of the expression, at compile time (i.e., without actually evaluating the result.
This method should always return a result, though it may be the best approximation that is available at the time.
getCardinality
in interface Expression
public int getDependencies()
Expression
getDependencies
in interface Expression
public int getSpecialProperties()
Expression
getSpecialProperties
in interface Expression
protected abstract void promoteInst(PromotionOffer offer) throws XPathException
XPathException
public Expression promote(PromotionOffer offer) throws XPathException
Expression
promote
in interface Expression
offer
- details of the offer, for example the offer to move
expressions that don't depend on the context to an outer level in
the containing expression
XPathException
- if any error is detectedprotected abstract void getXPathExpressions(List list)
public Expression[] getSubExpressions()
Expression
getSubExpressions
in interface Expression
public Item evaluateItem(XPathContext context) throws XPathException
Expression
evaluateItem
in interface Expression
context
- The context in which the expression is to be evaluated
XPathException
- if any dynamic error occurs evaluating the
expressionpublic final String evaluateAsString(XPathContext context) throws XPathException
Expression
evaluateAsString
in interface Expression
context
- The context in which the expression is to be evaluated
XPathException
- if any dynamic error occurs evaluating the
expressionpublic boolean effectiveBooleanValue(XPathContext context) throws XPathException
Expression
effectiveBooleanValue
in interface Expression
context
- The context in which the expression is to be evaluated
XPathException
- if any dynamic error occurs evaluating the
expressionpublic SequenceIterator iterate(XPathContext context) throws XPathException
Expression
iterate
in interface Expression
context
- supplies the context for evaluation
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 |