Esempio n. 1
0
 /**
  * Evaluate the specified query expression in this environment.
  *
  * @return the resulting set of targets.
  * @throws QueryException if the evaluation failed.
  */
 public Set<QueryTarget> evaluateQuery(QueryExpression expr)
     throws QueryException, InterruptedException {
   Set<String> targetLiterals = new HashSet<>();
   expr.collectTargetPatterns(targetLiterals);
   try {
     targetPatternEvaluator.preloadTargetPatterns(targetLiterals);
   } catch (BuildTargetException | BuildFileParseException | IOException e) {
     throw new QueryException("Error in preloading targets. %s", e.getMessage());
   }
   return expr.eval(this);
 }