|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.data.ExprInfo
org.basex.query.var.Variables
public final class Variables
Container of global variables of a module.
Field Summary | |
---|---|
java.util.HashMap<QNm,org.basex.query.var.Variables.VarEntry> |
vars
The variables. |
Constructor Summary | |
---|---|
Variables()
|
Method Summary | |
---|---|
void |
bindExternal(QueryContext ctx,
java.util.HashMap<QNm,Expr> bindings)
Binds all external variables. |
void |
check(QueryContext ctx)
Checks if all variables were declared and are visible to all their references. |
void |
checkUp()
Checks if none of the variables contains an updating expression. |
StaticVar |
declare(QNm nm,
SeqType t,
Ann a,
Expr e,
boolean ext,
StaticContext sctx,
VarScope scp,
java.lang.String xqdoc,
InputInfo ii)
Declares a new static variable. |
boolean |
declared(QNm nm)
Checks if a variable with the given name was already declared. |
java.util.Iterator<StaticVar> |
iterator()
|
StaticVarRef |
newRef(QNm nm,
StaticContext sctx,
InputInfo ii)
returns a new reference to the (possibly not yet declared) variable with the given name. |
void |
plan(FElem plan)
Creates an expression tree. |
java.lang.String |
toString()
|
Methods inherited from class org.basex.data.ExprInfo |
---|
addPlan, addPlan, description, info, planAttr, planElem |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final java.util.HashMap<QNm,org.basex.query.var.Variables.VarEntry> vars
Constructor Detail |
---|
public Variables()
Method Detail |
---|
public StaticVar declare(QNm nm, SeqType t, Ann a, Expr e, boolean ext, StaticContext sctx, VarScope scp, java.lang.String xqdoc, InputInfo ii) throws QueryException
nm
- variable namet
- typea
- annotationse
- bound expression, possibly null
ext
- external
flagsctx
- static contextscp
- variable scopexqdoc
- current xqdoc cacheii
- input info
QueryException
- query exceptionpublic void checkUp() throws QueryException
QueryException
- query exceptionpublic void check(QueryContext ctx) throws QueryException
ctx
- query context
QueryException
- query exceptionpublic void plan(FElem plan)
ExprInfo
plan
in class ExprInfo
plan
- root elementpublic java.lang.String toString()
toString
in class ExprInfo
public boolean declared(QNm nm)
nm
- variable name
public StaticVarRef newRef(QNm nm, StaticContext sctx, InputInfo ii) throws QueryException
ii
- input infonm
- variable namesctx
- static context
QueryException
- if the variable is not visiblepublic void bindExternal(QueryContext ctx, java.util.HashMap<QNm,Expr> bindings) throws QueryException
ctx
- query contextbindings
- variable bindings
QueryException
- query exceptionpublic java.util.Iterator<StaticVar> iterator()
iterator
in interface java.lang.Iterable<StaticVar>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |