public final class Rename extends Arr
Constructor and Description |
---|
Rename(StaticContext sc,
InputInfo info,
Expr trg,
Expr name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Expr |
copy(CompileContext cc,
IntObjMap<Var> vm)
Copies an expression.
|
boolean |
equals(Object obj)
This function is e.g. called by:
If.optimize(CompileContext) , Switch.optimize(CompileContext) ,
Typeswitch.optimize(CompileContext) , in order to discard identical expressions. |
boolean |
has(Flag... flags)
Indicates if an expression has one of the specified compiler properties.
|
Item |
item(QueryContext qc,
InputInfo ii)
Evaluates the expression and returns the resulting item,
or
Empty.VALUE if the expression yields an empty sequence. |
String |
toString() |
accept, allAreValues, checkUp, compile, copyAll, count, emptyExpr, exprSize, inline, inline, inlineable, plan, toString
adoptType, atomValue, checkAllUp, checkNoEmpty, checkNoEmpty, checkNoneUp, checkNoUp, checkType, checkType, checkUp, copyType, ctxValue, ebv, iter, seqType, size, test, toArray, toArray, toAtomItem, toB64, toB64, toBin, toBin, toBoolean, toBoolean, toBytes, toBytes, toDouble, toDouble, toElem, toEmptyNode, toEmptyToken, toFloat, toFunc, toItem, toItem, toLong, toLong, toMap, toMap, toNode, toNode, toNumber, toNumber, toQNm, toQNm, toToken, toToken, toTokenOrNull, value
atomItem, atomIter, data, funcType, hasFreeVars, indexAccessible, inlineAll, isSimple, isVacuous, iterable, markTailCalls, merge, optimize, optimizeEbv, typeCheck, uses, visitAll
description, toErrorString
public Rename(StaticContext sc, InputInfo info, Expr trg, Expr name)
sc
- static contextinfo
- input infotrg
- target expressionname
- new name expressionpublic Item item(QueryContext qc, InputInfo ii) throws QueryException
Expr
Empty.VALUE
if the expression yields an empty sequence.
If this method is not implemented, Expr.value(QueryContext)
must be implemented instead.item
in class ParseExpr
qc
- query contextii
- input info (only required by Seq
instances, which have no input info)Empty.VALUE
QueryException
- query exceptionpublic Expr copy(CompileContext cc, IntObjMap<Var> vm)
Expr
VarRef.inline(org.basex.query.var.Var, org.basex.query.expr.Expr, org.basex.query.CompileContext)
, FuncItem.inline(org.basex.query.expr.Expr[], org.basex.query.CompileContext)
,
Closure.inline(org.basex.query.var.Var, org.basex.query.expr.Expr, org.basex.query.CompileContext)
and StaticFunc.inline(org.basex.query.expr.Expr[], org.basex.query.CompileContext)
.copy
in class Expr
cc
- compilation contextvm
- mapping from old variable IDs to new variable copies.
Required by Closure.copy(org.basex.query.CompileContext, org.basex.util.hash.IntObjMap<org.basex.query.var.Var>)
and VarRef.copy(org.basex.query.CompileContext, org.basex.util.hash.IntObjMap<org.basex.query.var.Var>)
public boolean equals(Object obj)
Arr
If.optimize(CompileContext)
, Switch.optimize(CompileContext)
,
Typeswitch.optimize(CompileContext)
, in order to discard identical expressions.
CmpR.merge(Expr, boolean, CompileContext)
or
CmpSR.merge(Expr, boolean, CompileContext)
,
in order to merge expressions with identical input.
CmpG.optimize(CompileContext)
or CmpV.optimize(CompileContext)
,
in order to pre-evaluate equality tests.
CmpG.optimize(CompileContext)
or
Pos.get(Expr, CmpV.OpV, InputInfo, CompileContext)
,
in order to compare the start and end value.
PathCache
, in order to find identical root values at runtime.
public boolean has(Flag... flags)
Expr
true
if at least flag matches an expression.Copyright © 2005–2019 BaseX Team. All rights reserved.