code: public <T> Evaluator<List<T>> createEvaluator(QueryMetadata metadata,
              Expression<? extends T> source, Predicate filter) {
          String typeName = ClassUtils.getName(source.getType());
          CollQuerySerializer ser = new CollQuerySerializer(templates);
          ser.append("java.util.List<" + typeName + "> rv = new java.util.ArrayList<" + typeName + ">();\n");
          ser.append("for (" + typeName + " " + source + " : " + source + "_) {\n");
          ser.append("    try {\n");
          ser.append("        if (").handle(filter).append(") {\n");
          ser.append("            rv.add(" + source + ");\n");
          ser.append("        }\n");
          ser.append("    } catch (NullPointerException npe) { }\n");
          ser.append("}\n");
          ser.append("return rv;");
  
          Map<Object,String> constantToLabel = ser.getConstantToLabel();
          Map<String, Object> constants = getConstants(metadata, constantToLabel);
  
          Type sourceType = new ClassType(TypeCategory.SIMPLE, source.getType());
          ClassType sourceListType = new ClassType(TypeCategory.SIMPLE, Iterable.class, sourceType);
  
          return factory.createEvaluator(
                  ser.toString(),
                  sourceListType,
                  new String[]{source + "_"},
                  new Type[]{sourceListType},
                  new Class<?>[]{Iterable.class},
                  constants);
      }
docs: Create an Evaluator for the given source and filter
  
  @param <T>
  @param source source of the query
  @param filter filter of the query
  @return evaluator