private ValueAttribute findAttribute(String name) {
    Objects.requireNonNull(name, "name");
    final ValueType type = rule.value(Model.class);
    return type.attributes.stream().filter(a -> a.name().equals(name))
            .findAny().orElseThrow(() -> new NoSuchElementException(name + " not found in " + Model.class.getSimpleName()));
  }
Scans all attributes using reflection and generates a matcher
criteria/common/test/org/immutables/criteria/processor/CriteriaModelProcessorTest.java