public <T> CriteriaContext appendPath(Class<?> type, String pathAsString, CriteriaCreator<T> creator) {
    final Member member = memberLookup.find(type, pathAsString)
            .orElseThrow(() -> new IllegalArgumentException(String.format("Path %s not found in %s", pathAsString, type)));

    Path newPath;
    Expression partial = state.partial();
    if (partial == null) {
      newPath = Path.ofMember(member);
    } else if (partial instanceof Path) {
      newPath = Visitors.toPath(partial).append(member);
    } else {
      throw new IllegalStateException("Partial expression is not a path: " + partial);
    }

    return new CriteriaContext(this, state.withPartial(newPath).withCreator(creator));
  }
adds an intermediate path to partial expression
criteria/common/src/org/immutables/criteria/matcher/CriteriaContext.java