lux.xquery
Class TreatAs

java.lang.Object
  extended by lux.xpath.AbstractExpression
      extended by lux.xquery.TreatAs
All Implemented Interfaces:
Visitable

public class TreatAs
extends AbstractExpression


Nested Class Summary
 
Nested classes/interfaces inherited from class lux.xpath.AbstractExpression
AbstractExpression.Type
 
Field Summary
 
Fields inherited from class lux.xpath.AbstractExpression
subs, sup
 
Constructor Summary
TreatAs(AbstractExpression expr, NodeTest nodeTest, String occurrence)
           
TreatAs(AbstractExpression expr, ValueType type, String occurrence)
           
 
Method Summary
 AbstractExpression accept(ExpressionVisitor visitor)
           
 VariableContext getBindingContext()
          If this expression depends "directly" on a variable, return that variable's binding context: a for or let clause, or a global variable definition.
 int getPrecedence()
           
 void toString(StringBuilder buf)
          Each subclass must implement the toString(StringBuilder) method by rendering itself as a syntatically valid XPath/XQuery expression in the given buffer.
 
Methods inherited from class lux.xpath.AbstractExpression
acceptSubs, appendSub, getLastContextStep, getRoot, getSubs, getSuper, getTail, getType, isAbsolute, isDocumentOrdered, replaceRoot, setSubs, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreatAs

public TreatAs(AbstractExpression expr,
               ValueType type,
               String occurrence)

TreatAs

public TreatAs(AbstractExpression expr,
               NodeTest nodeTest,
               String occurrence)
Method Detail

accept

public AbstractExpression accept(ExpressionVisitor visitor)

toString

public void toString(StringBuilder buf)
Description copied from class: AbstractExpression
Each subclass must implement the toString(StringBuilder) method by rendering itself as a syntatically valid XPath/XQuery expression in the given buffer.

Specified by:
toString in class AbstractExpression

getPrecedence

public int getPrecedence()
Specified by:
getPrecedence in class AbstractExpression
Returns:
a number indicating the *outer* precedence of this expression. Expressions with lower precedence numbers have lower precedence, ie bind more loosely, than expressions with higher precedence. Expressions with no sub-expressions are assigned a high precedence. Complex expressions can be seen as having an inner and an outer precedence; for example function call expressions behave as a comma with regard to their sub-expressions, the arguments, and like parentheses to their enclosing expression.

getBindingContext

public VariableContext getBindingContext()
Description copied from class: AbstractExpression
If this expression depends "directly" on a variable, return that variable's binding context: a for or let clause, or a global variable definition. This recurses through variables, so if there are aliases it retrieves the ultimate context. We need to define directly dependent precisely; what it's used for is to determine with an order by expression is dependent on a for-variable, and ultimately whether an order by optimization can be applied.

Overrides:
getBindingContext in class AbstractExpression
Returns:
the binding context of the base expression


Copyright © 2013. All Rights Reserved.