|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.expr.flwor.Clause
public abstract class Clause
A "Clause" refers specifically to one of the clauses of a FLWOR expression, for example the "for" clause, the "let" clause, the "where" or "order by" clause. (The "return" clause, however, is not modelled as a Clause).
Field Summary | |
---|---|
static int |
COUNT
|
static int |
FOR
|
static int |
GROUPBYCLAUSE
|
static int |
LET
|
static int |
ORDERBYCLAUSE
|
static int |
WHERE
|
static int |
WINDOW
|
Constructor Summary | |
---|---|
Clause()
|
Method Summary | |
---|---|
abstract Clause |
copy()
|
abstract void |
explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
void |
gatherVariableReferences(ExpressionVisitor visitor,
Binding binding,
List<VariableReference> refs)
Build a list of all references to a variables declared in this clause |
abstract int |
getClauseKey()
Get a keyword identifying what kind of clause this is |
abstract TuplePull |
getPullStream(TuplePull base,
XPathContext context)
Get a pull-mode tuple stream that implements the functionality of this clause, taking its input from another tuple stream which this clause modifies |
abstract TuplePush |
getPushStream(TuplePush destination,
XPathContext context)
Get a push-mode tuple stream that implements the functionality of this clause, supplying its output to another tuple stream |
LocalVariableBinding[] |
getRangeVariables()
Get the variables bound by this clause |
void |
optimize(ExpressionVisitor visitor,
ExpressionVisitor.ContextItemType contextItemType)
Optimize any expressions contained within this clause |
abstract void |
processSubExpressions(ExpressionProcessor processor)
Process the subexpressions of this clause |
void |
refineVariableType(ExpressionVisitor visitor,
List<VariableReference> references,
Expression returnExpr)
Supply improved type information to the expressions that contain references to the variables declared in this clause |
void |
typeCheck(ExpressionVisitor visitor)
Type-check any expression contained within this clause |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FOR
public static final int LET
public static final int WINDOW
public static final int GROUPBYCLAUSE
public static final int COUNT
public static final int ORDERBYCLAUSE
public static final int WHERE
Constructor Detail |
---|
public Clause()
Method Detail |
---|
public abstract Clause copy()
public void optimize(ExpressionVisitor visitor, ExpressionVisitor.ContextItemType contextItemType) throws XPathException
visitor
- the ExpressionVisitor, providing access to static context informationcontextItemType
- the type of the context item
XPathException
- if any error is detectedpublic void typeCheck(ExpressionVisitor visitor) throws XPathException
visitor
- the ExpressionVisitor, providing access to static context information
XPathException
- if any error is detectedpublic abstract TuplePull getPullStream(TuplePull base, XPathContext context)
base
- the input tuple streamcontext
- the dynamic evaluation context
public abstract TuplePush getPushStream(TuplePush destination, XPathContext context)
destination
- the output tuple streamcontext
- the dynamic evaluation context
public abstract void processSubExpressions(ExpressionProcessor processor) throws XPathException
processor
- the expression processor used to process the subexpressions
XPathException
- if any error is detectedpublic abstract void explain(ExpressionPresenter out)
out
- the expression presenter used to display the structurepublic LocalVariableBinding[] getRangeVariables()
public void gatherVariableReferences(ExpressionVisitor visitor, Binding binding, List<VariableReference> refs)
visitor
- the expression visitorbinding
- a variable declared in this clauserefs
- the list of variable references, initially empty, to which the method will appendpublic void refineVariableType(ExpressionVisitor visitor, List<VariableReference> references, Expression returnExpr)
visitor
- the expression visitorreferences
- the list of variable referencesreturnExpr
- the expression in the return clausepublic abstract int getClauseKey()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |