MyReader (final @NotNull PairConsumer<JsonSchemaObject, List<JsonSchemaObject>> delegate) { return (element, object, queue, virtualFile) -> { if (element instanceof JsonArrayValueAdapter) { final List<JsonValueAdapter> list = ((JsonArrayValueAdapter)element).getElements(); final List<JsonSchemaObject> members = new ArrayList<>(list.size()); for (int i = 0; i < list.size(); i++) { JsonValueAdapter value = list.get(i); if (!(value.isObject())) continue; members.add(enqueue(queue, new JsonSchemaObject(virtualFile, getNewPointer(String.valueOf(i), object.getPointer())), value)); } delegate.consume(object, members); } }; }