Package org.basex.query
Class InlineContext
java.lang.Object
org.basex.query.InlineContext
Context for inlining expressions.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a copy from the expression to be inlined.Inlines an expression into the specified target expression.booleanInlines an expression into the specified expressions.booleanInlines an expression into the specified expressions.booleaninlineable(Expr... targets) Checks if inlining into the specified expressions is possible.inlineOrNull(Expr target) Inlines an expression into the specified target expression, or returnsnullif no inlining is required.
-
Field Details
-
cc
Compilation context. -
var
Variable reference, ornullfor context reference. -
expr
Expression to inline.
-
-
Constructor Details
-
InlineContext
Constructor.- Parameters:
var- variable (Varreference) or context (null) to replaceexpr- expression to inlinecc- compilation context
-
-
Method Details
-
inlineable
Checks if inlining into the specified expressions is possible. SeeExpr.inlineable(org.basex.query.InlineContext)for further details.- Parameters:
targets- target expressions- Returns:
- result of check
-
inline
Inlines an expression into the specified target expression. SeeExpr.inline(org.basex.query.InlineContext)for further details.- Parameters:
target- expression in which the expression will be inlined- Returns:
- optimized or original expression
- Throws:
QueryException- query exception
-
inlineOrNull
Inlines an expression into the specified target expression, or returnsnullif no inlining is required. SeeExpr.inline(org.basex.query.InlineContext)for further details.- Parameters:
target- expression in which the expression will be inlined- Returns:
- optimized expression or
null - Throws:
QueryException- query exception
-
inline
Inlines an expression into the specified expressions.- Parameters:
exprs- expressions to update- Returns:
trueif the array has changed,falseotherwise- Throws:
QueryException- query exception
-
inline
Inlines an expression into the specified expressions.- Parameters:
exprs- expressions to updateerror- catch errors- Returns:
trueif the array has changed,falseotherwise- Throws:
QueryException- query exception
-
copy
Creates a copy from the expression to be inlined.- Returns:
- copy
- Throws:
QueryException- query exception
-