|
||||||||||
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.Single
org.basex.query.expr.TypeCase
public final class TypeCase
Case expression for typeswitch.
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.Single |
---|
expr |
Fields inherited from class org.basex.query.expr.ParseExpr |
---|
info, size, type |
Constructor Summary | |
---|---|
TypeCase(InputInfo ii,
Var v,
SeqType[] ts,
Expr r)
Constructor. |
Method Summary | |
---|---|
boolean |
accept(ASTVisitor visitor)
Traverses this expression, notifying the visitor of declared and used variables, and checking the tree for other recursive properties. |
TypeCase |
compile(QueryContext ctx,
VarScope scp)
Compiles and optimizes the expression, assigns data types and cardinalities. |
TypeCase |
copy(QueryContext ctx,
VarScope scp,
IntObjMap<Var> vs)
Copies an 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. |
TypeCase |
markTailCalls()
Finds and marks tail calls, enabling TCO. |
boolean |
matches(Value val)
Checks if the given value matches this case. |
void |
plan(FElem plan)
Creates an expression tree. |
java.lang.String |
toString()
|
Methods inherited from class org.basex.query.expr.Single |
---|
checkUp, count, has, removable |
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, indexEquivalent, inlineAll, isEmpty, isFunction, isItem, isVacuous, isValue, iterable, 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 TypeCase(InputInfo ii, Var v, SeqType[] ts, Expr r)
ii
- input infov
- variablets
- sequence types this case matches, the empty array means default
r
- return expressionMethod Detail |
---|
public TypeCase compile(QueryContext ctx, VarScope scp) throws QueryException
Expr
compile
in class Single
ctx
- query contextscp
- variable scope
QueryException
- query exceptionpublic Expr inline(QueryContext ctx, VarScope scp, Var v, Expr e) throws QueryException
Expr
inline
in class Single
ctx
- query context for recompilationscp
- variable scope for recompilationv
- variable to replacee
- expression to inline
null
otherwise
QueryException
- query exceptionpublic TypeCase 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 boolean matches(Value val)
val
- value to be matched
true
if it matches, false
otherwisepublic void plan(FElem plan)
ExprInfo
plan
in class Single
plan
- root elementpublic java.lang.String toString()
toString
in class ExprInfo
public TypeCase markTailCalls()
Expr
markTailCalls
in class Expr
public boolean accept(ASTVisitor visitor)
Expr
accept
in class Single
visitor
- visitor
public int exprSize()
Expr
exprSize
in class Single
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |