public abstract class Clause extends Object
Modifier and Type | Field and Description |
---|---|
static int |
COUNT |
static int |
FOR |
static int |
GROUPBYCLAUSE |
static int |
LET |
static int |
ORDERBYCLAUSE |
static int |
TRACE |
static int |
WHERE |
static int |
WINDOW |
Constructor and Description |
---|
Clause() |
Modifier and Type | Method and Description |
---|---|
boolean |
containsNonInlineableVariableReference(Binding binding)
Determine whether the clause contains a reference to a local variable binding that cannot be inlined
|
abstract Clause |
copy()
Create a copy of this clause
|
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
|
int |
getLocationId()
Get the location ID, which can be used in conjunction with a LocationProvider to determine
the system ID and line number of the clause
|
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,
ContextItemStaticInfo 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 |
setLocationId(int locationId)
Set the location ID, which can be used in conjunction with a LocationProvider to determine
the system ID and line number of the clause
|
void |
typeCheck(ExpressionVisitor visitor)
Type-check any expression contained within this clause
|
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
public static final int TRACE
public int getLocationId()
public void setLocationId(int locationId)
locationId
- the location IDpublic abstract Clause copy()
public void optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
visitor
- the ExpressionVisitor, providing access to static context informationcontextItemType
- the type of the context itemXPathException
- if any error is detectedpublic void typeCheck(ExpressionVisitor visitor) throws XPathException
visitor
- the ExpressionVisitor, providing access to static context informationXPathException
- if any error is detectedpublic abstract TuplePull getPullStream(TuplePull base, XPathContext context)
base
- the input tuple streamcontext
- the dynamic evaluation contextpublic abstract TuplePush getPushStream(TuplePush destination, XPathContext context)
destination
- the output tuple streamcontext
- the dynamic evaluation contextpublic abstract void processSubExpressions(ExpressionProcessor processor) throws XPathException
processor
- the expression processor used to process the subexpressionsXPathException
- 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 boolean containsNonInlineableVariableReference(Binding binding)
binding
- the binding for the local variable in questionpublic 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()
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.