MCPcopy Create free account
hub / github.com/BaseXdb/basex / simplifyAll

Method simplifyAll

basex-core/src/main/java/org/basex/query/expr/Arr.java:115–126  ·  view source on GitHub ↗

Simplifies all expressions for requests of the specified type. @param mode mode of simplification @param cc compilation context @return simplified or original expressions @throws QueryException query exception

(final Simplify mode, final CompileContext cc)

Source from the content-addressed store, hash-verified

113 * @throws QueryException query exception
114 */
115 protected final Expr[] simplifyAll(final Simplify mode, final CompileContext cc)
116 throws QueryException {
117
118 boolean changed = false;
119 final ExprList list = new ExprList(exprs.length);
120 for(final Expr expr : exprs) {
121 final Expr ex = expr.simplifyFor(mode, cc);
122 if(ex != expr) changed = true;
123 list.add(ex);
124 }
125 return changed ? list.finish() : exprs;
126 }
127
128 /**
129 * Flattens nested expressions.

Callers 14

simplifyForMethod · 0.80
optimizeMethod · 0.80
optimizeMethod · 0.80
optimizeMethod · 0.80
simplifyForMethod · 0.80
optimizeMethod · 0.80
optimizeMethod · 0.80
optimizeMethod · 0.80
optimizeMethod · 0.80
optValueMethod · 0.80
optimizeMethod · 0.80
simplifyForMethod · 0.80

Calls 3

addMethod · 0.65
simplifyForMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected