|
||||||||||
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.Catch
public final class Catch
Catch clause.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
---|
Expr.Flag |
Field Summary | |
---|---|
static QNm[] |
NAMES
Error QNames. |
static SeqType[] |
TYPES
Error types. |
static byte[] |
WILDCARD
Prefix wildcard. |
Fields inherited from class org.basex.query.expr.Single |
---|
expr |
Fields inherited from class org.basex.query.expr.ParseExpr |
---|
info, size, type |
Constructor Summary | |
---|---|
Catch(InputInfo ii,
NameTest[] c,
QueryContext ctx,
VarScope scp)
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. |
protected Expr |
asExpr(QueryException ex,
QueryContext ctx,
VarScope scp)
Returns this clause as an inlineable expression. |
Catch |
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. |
int |
exprSize()
Counts the number of expressions in this expression's sub-tree. |
Catch |
inline(QueryContext ctx,
VarScope scp,
Var v,
Expr e)
Inlines an expression into this one, replacing all references to the given variable. |
protected boolean |
matches(QueryException qe)
Checks if one of the specified errors match the thrown error. |
java.lang.String |
toString()
|
static Value[] |
values(QueryException ex)
Returns all error values. |
Var[] |
vars()
Returns the variables used in the catch expression. |
Methods inherited from class org.basex.query.expr.Single |
---|
checkUp, count, has, plan, 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, 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 |
Field Detail |
---|
public static final byte[] WILDCARD
public static final QNm[] NAMES
public static final SeqType[] TYPES
Constructor Detail |
---|
public Catch(InputInfo ii, NameTest[] c, QueryContext ctx, VarScope scp)
ii
- input infoc
- supported error codesctx
- query contextscp
- variable scopeMethod Detail |
---|
public Catch compile(QueryContext ctx, VarScope scp) throws QueryException
Expr
compile
in class Single
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 Catch 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 exceptionprotected Expr asExpr(QueryException ex, QueryContext ctx, VarScope scp) throws QueryException
ex
- caught exceptionctx
- query contextscp
- variable scope
QueryException
- query exception during inliningpublic static Value[] values(QueryException ex)
ex
- exception
public Var[] vars()
catch
expression.
protected boolean matches(QueryException qe)
qe
- thrown error
public java.lang.String toString()
toString
in class ExprInfo
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 |