Modifier and Type | Method and Description |
---|---|
String |
description()
Returns a string description of the expression.
|
boolean |
equals(Object obj)
This function is e.g.
|
boolean |
has(Flag... flags)
Indicates if an expression has one of the specified compiler properties.
|
boolean |
inlineable(InlineContext ic)
Checks if inlining is possible.
|
abstract Item |
item(QueryContext qc,
InputInfo ii)
Evaluates the expression and returns the resulting item,
or
Empty.VALUE if the expression yields an empty sequence. |
protected void |
plan(QueryString qs,
String kind)
Adds the expression with the specified separator to the query string.
|
accept, allAreValues, args, checkUp, compile, copyAll, count, exprSize, flatten, inline, inline, mayBePositional, plan, simplifyAll
adoptType, atomValue, checkAllUp, checkNoEmpty, checkNoEmpty, checkNoneUp, checkNoUp, checkType, checkType, checkUp, copyType, ctxValue, ebv, iter, refineType, seqType, size, test, toArray, toArray, toAtomItem, toB64, toB64, toBin, toBin, toBoolean, toBoolean, toBytes, toBytes, toDouble, toDouble, toElem, toFloat, toFunc, toItem, toItem, toLong, toLong, toMap, toMap, toNode, toNode, toNodeOrNull, toNumber, toNumberOrNull, toQNm, toQNm, toToken, toToken, toTokenOrNull, toZeroToken, value
arg, atomItem, atomIter, copy, data, data, ddo, funcType, hasFreeVars, indexAccessible, isSimple, markTailCalls, mergeEbv, optimize, simplifyFor, typeCheck, uses, vacuous, visitAll
plan, toErrorString, toString
public abstract 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 boolean has(Flag... flags)
Expr
true
if at least flag matches an expression.public boolean inlineable(InlineContext ic)
Expr
InlineContext.inlineable(org.basex.query.expr.Expr...)
and:
inlineable(org.basex.query.InlineContext)
returns false if the new expression construct new nodes.
The following tests might reject inlining if the expression is a context reference:
inlineable
in class Arr
ic
- inlining contextpublic boolean equals(Object obj)
Arr
If.optimize(CompileContext)
, Switch.optimize(CompileContext)
,
Typeswitch.optimize(CompileContext)
, in order to discard identical expressions.
CmpR.mergeEbv(Expr, boolean, CompileContext)
or
CmpSR.mergeEbv(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 final String description()
ExprInfo
ExprInfo.toString()
method,
arguments are not included in the output.description
in class ExprInfo
protected void plan(QueryString qs, String kind)
qs
- query string builderkind
- node kindCopyright © 2005–2023 BaseX Team. All rights reserved.