@SafeVarargs
  public final Self withParents(final Class<? extends ParentType> @NotNull ... types) {
    return with(new PatternCondition<T>("withParents") {
      @Override
      public boolean accepts(@NotNull T t, ProcessingContext context) {
        ParentType current = getParent(t);
        for (Class<? extends ParentType> type : types) {
          if (current == null || !type.isInstance(current)) {
            return false;
          }
          current = getParent(current);
        }
        return true;
      }
    });
  }
@SafeVarargs
  public final Self withParents(final Class<? extends ParentType> @NotNull ... types)