MyReader (String prop, PairConsumer<JsonSchemaObject, JsonSchemaObject> propertySetter) { return (element, object, queue, virtualFile) -> { if (element.isObject()) { propertySetter.consume(object, enqueue(queue, new JsonSchemaObject(virtualFile, getNewPointer(prop, object.getPointer())), element)); } }; }