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

Method uses

basex-core/src/main/java/org/basex/query/expr/Expr.java:242–251  ·  view source on GitHub ↗

Checks if the given variable is used by this expression. @param var variable to be checked @return true if the variable is used

(final Var var)

Source from the content-addressed store, hash-verified

240 * @return {@code true} if the variable is used
241 */
242 public final boolean uses(final Var var) {
243 // return true iff the search was aborted, i.e. the variable is used
244 return !accept(new ASTVisitor() {
245 @Override
246 public boolean used(final VarRef ref) {
247 // abort when the variable is used
248 return ref.var != var;
249 }
250 });
251 }
252
253 /**
254 * Checks if inlining is possible.

Callers 7

inlineableMethod · 0.80
inlineableMethod · 0.80
inlineableMethod · 0.80
inlineableMethod · 0.80
toPredicateMethod · 0.80
foldMethod · 0.80
inlineableMethod · 0.80

Calls 1

acceptMethod · 0.95

Tested by

no test coverage detected