|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectlux.xpath.AbstractExpression
public abstract class AbstractExpression
An abstract XPath or XQuery expression. This class and its subclasses represent XPath expressions. Their toString() methods return valid XPath.
| Nested Class Summary | |
|---|---|
static class |
AbstractExpression.Type
|
| Field Summary | |
|---|---|
protected AbstractExpression[] |
subs
|
protected AbstractExpression |
sup
|
| Constructor Summary | |
|---|---|
protected |
AbstractExpression(AbstractExpression.Type type)
|
| Method Summary | |
|---|---|
void |
acceptSubs(ExpressionVisitor visitor)
|
protected void |
appendSub(StringBuilder buf,
AbstractExpression sub)
append the sub-expression to the buffer, wrapping it in parentheses if its precedence is lower than or equal to this expression's. |
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. |
AbstractExpression |
getLastContextStep()
This method is called by the optimizer in order to determine an element or attribute QName (or wildcard) against which some expression is being compared, in order to generate an appropriate text query. |
abstract int |
getPrecedence()
|
AbstractExpression |
getRoot()
|
AbstractExpression[] |
getSubs()
|
AbstractExpression |
getSuper()
|
AbstractExpression |
getTail()
|
AbstractExpression.Type |
getType()
Most types will correspond one-one with a subclass of AbstractExpression, but this enumerated value provides an integer equivalent that should be useful for efficient switch operations, encoding and the like. |
boolean |
isAbsolute()
|
boolean |
isDocumentOrdered()
|
AbstractExpression |
replaceRoot(AbstractExpression replacement)
If this has absolute subexpressions, replace them with the replacement expression (see Root.replaceRoot(AbstractExpression) |
protected void |
setSubs(AbstractExpression... subExprs)
|
String |
toString()
|
abstract 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 java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface lux.xpath.Visitable |
|---|
accept |
| Field Detail |
|---|
protected AbstractExpression sup
protected AbstractExpression[] subs
| Constructor Detail |
|---|
protected AbstractExpression(AbstractExpression.Type type)
| Method Detail |
|---|
public AbstractExpression.Type getType()
public void acceptSubs(ExpressionVisitor visitor)
public AbstractExpression getSuper()
public AbstractExpression[] getSubs()
protected void setSubs(AbstractExpression... subExprs)
public abstract void toString(StringBuilder buf)
buf - public String toString()
toString in class Objectpublic AbstractExpression getRoot()
public boolean isAbsolute()
public boolean isDocumentOrdered()
public AbstractExpression replaceRoot(AbstractExpression replacement)
Root.replaceRoot(AbstractExpression)
replacement - the expression to use in place of '/'
protected void appendSub(StringBuilder buf,
AbstractExpression sub)
buf - the buffer to append tosub - the sub-expressionpublic AbstractExpression getTail()
PathExpression.getTail().public AbstractExpression getLastContextStep()
public VariableContext getBindingContext()
public abstract int getPrecedence()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||