public CriteriaContext any() {
    Path path = path();
    Class<?> newType; // new path starts at this root
    try {
      newType = (Class<?>) Matchers.iterableTypeArgument(path.returnType());
    } catch (IllegalArgumentException|ClassCastException e) {
      throw new IllegalArgumentException(String.format("At path %s for %s",
              path.toStringPath(), path.returnType()), e);
    }

    Path newPath = Path.ofClass(newType);
    Combiner combiner = ((left, right) -> Expressions.binaryCall(IterableOperators.ANY, path, right));
    return new CriteriaContext(previous, state.withCombiner(combiner).withPartial(newPath));
  }
Build {@link IterableMatcher#any()} sub-matcher.
criteria/common/src/org/immutables/criteria/matcher/CriteriaContext.java