|
||||||||||
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.expr.Expr
org.basex.query.expr.ParseExpr
org.basex.query.expr.Arr
org.basex.query.expr.SwitchCase
public final class SwitchCase
Single case of a switch expression.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
---|
Expr.Flag |
Field Summary |
---|
Fields inherited from class org.basex.query.expr.Arr |
---|
expr |
Fields inherited from class org.basex.query.expr.ParseExpr |
---|
info, size, type |
Constructor Summary | |
---|---|
SwitchCase(InputInfo ii,
Expr... e)
Constructor. |
Method Summary | |
---|---|
void |
checkUp()
Checks if all updating expressions are correctly placed. |
Expr |
compile(QueryContext ctx,
VarScope scp)
Compiles and optimizes the expression, assigns data types and cardinalities. |
Expr |
copy(QueryContext ctx,
VarScope scp,
IntObjMap<Var> vs)
Copies an expression. |
VarUsage |
count(Var v)
Checks how often a variable is used in this expression. |
protected VarUsage |
countCases(Var v)
Checks how often a variable is used in this expression. |
int |
exprSize()
Counts the number of expressions in this expression's sub-tree. |
Expr |
inline(QueryContext ctx,
VarScope scp,
Var v,
Expr e)
Inlines an expression into this one, replacing all references to the given variable. |
java.lang.String |
toString()
|
Methods inherited from class org.basex.query.expr.Arr |
---|
accept, allAreValues, checkNoUp, copyAll, has, indexEquivalent, plan, removable, toString |
Methods inherited from class org.basex.query.expr.ParseExpr |
---|
checkAdmin, checkAllUp, checkBinary, checkBln, checkColl, checkCreate, checkCtx, checkDbl, checkDBNode, checkEStr, checkEStr, checkFunc, checkItem, checkItr, checkItr, checkMap, checkNode, checkNode, checkNode, checkNoEmpty, checkNoneUp, checkNoUp, checkQNm, checkStr, checkStr, checkStrBin, checkType, checkWrite, compBln, copyType, ebv, item, iter, optPre, preEval, size, test, type, value |
Methods inherited from class org.basex.query.expr.Expr |
---|
addText, compEbv, copy, hasFreeVars, indexAccessible, inlineAll, isEmpty, isFunction, isItem, isVacuous, isValue, iterable, markTailCalls, optimize, sameAs, uses, visitAll |
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 |
Constructor Detail |
---|
public SwitchCase(InputInfo ii, Expr... e)
ii
- input infoe
- return expression (placed first) and casesMethod Detail |
---|
public void checkUp() throws QueryException
Expr
checkUp
in class Arr
QueryException
- query exceptionpublic Expr compile(QueryContext ctx, VarScope scp) throws QueryException
Expr
compile
in class Arr
ctx
- query contextscp
- variable scope
QueryException
- query exceptionpublic Expr copy(QueryContext ctx, VarScope scp, IntObjMap<Var> vs)
Expr
copy
in class Expr
ctx
- query contextscp
- variable scope for creating new variablesvs
- mapping from old variable IDs to new variable copies
public Expr inline(QueryContext ctx, VarScope scp, Var v, Expr e) throws QueryException
Expr
inline
in class Arr
ctx
- query context for recompilationscp
- variable scope for recompilationv
- variable to replacee
- expression to inline
null
otherwise
QueryException
- query exceptionpublic java.lang.String toString()
toString
in class ExprInfo
public VarUsage count(Var v)
count
in class Arr
v
- variable to look for
VarUsage
protected VarUsage countCases(Var v)
v
- variable to look for
public int exprSize()
Expr
exprSize
in class Arr
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |