|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.query.ExprInfo
org.basex.query.expr.Expr
org.basex.query.util.Var
public final class Var
Variable.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
---|
Expr.Use |
Field Summary | |
---|---|
Expr |
expr
Variable expressions. |
boolean |
global
Global flag. |
Item |
item
Variable results. |
QNm |
name
Variable name. |
Return |
ret
Return type. |
SeqType |
type
Data type. |
Constructor Summary | |
---|---|
Var(QNm n)
Constructor. |
|
Var(QNm n,
boolean g)
Constructor. |
|
Var(QNm n,
SeqType t,
boolean g)
Constructor. |
Method Summary | |
---|---|
Var |
bind(Expr e,
QueryContext ctx)
Binds the specified expression to the variable. |
Var |
bind(Item it,
QueryContext ctx)
Binds the specified item to the variable. |
String |
color()
Returns a color string for the expression. |
Var |
comp(QueryContext ctx)
Optimizes and compiles the expression. |
Var |
copy()
Returns a copy of the variable. |
boolean |
eq(Var v)
Compares the variables for reference or name equality. |
Item |
item(QueryContext ctx)
Evaluates the variable and returns the resulting item. |
Iter |
iter(QueryContext ctx)
Evaluates the expression and returns an iterator on the resulting items. |
void |
plan(Serializer ser)
Recursively sends the abstract syntax of this expression to the specified serializer. |
Return |
returned(QueryContext ctx)
Indicates the return type of an expression. |
String |
toString()
|
boolean |
uses(Expr.Use u,
QueryContext ctx)
Indicates if an expression uses the specified type. |
boolean |
visible(Var v)
Checks if the variable is not shadowed by the specified variable. |
Methods inherited from class org.basex.query.expr.Expr |
---|
addText, atomic, checkCtx, checkDbl, checkItr, duplicates, e, ebv, i, indexAccessible, indexEquivalent, removable, remove, sameAs, size, test, v |
Methods inherited from class org.basex.query.ExprInfo |
---|
info, name |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public Return ret
public final boolean global
public final QNm name
public SeqType type
public Expr expr
public Item item
Constructor Detail |
---|
public Var(QNm n)
n
- variable namepublic Var(QNm n, boolean g)
n
- variable nameg
- global flagpublic Var(QNm n, SeqType t, boolean g)
n
- variable namet
- data typeg
- global flagMethod Detail |
---|
public Var comp(QueryContext ctx) throws QueryException
Expr
comp
in class Expr
ctx
- query context
QueryException
- query exceptionpublic Var bind(Expr e, QueryContext ctx) throws QueryException
e
- expression to be setctx
- query context
QueryException
- query exceptionpublic Var bind(Item it, QueryContext ctx) throws QueryException
it
- item to be setctx
- query context
QueryException
- query exceptionpublic Iter iter(QueryContext ctx) throws QueryException
Expr
Expr.atomic(org.basex.query.QueryContext)
must be implemented.
iter
in class Expr
ctx
- query context
QueryException
- query exceptionpublic Item item(QueryContext ctx) throws QueryException
ctx
- query context
QueryException
- query exceptionpublic boolean eq(Var v)
v
- variable
public boolean visible(Var v)
v
- variable
public Var copy()
public boolean uses(Expr.Use u, QueryContext ctx)
Expr
true
is returned by default and thus assumed as "worst-case".
uses
in class Expr
u
- use type to be checkedctx
- query context
public Return returned(QueryContext ctx)
Expr
returned
in class Expr
ctx
- query context
public String color()
ExprInfo
color
in class ExprInfo
public void plan(Serializer ser) throws IOException
ExprInfo
plan
in class ExprInfo
ser
- serializer
IOException
- I/O exceptionpublic String toString()
toString
in class ExprInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |