MyReader () { return (element, object, queue, virtualFile) -> { if (element instanceof JsonObjectValueAdapter) { final HashMap<String, List<String>> propertyDependencies = new HashMap<>(); final HashMap<String, JsonSchemaObject> schemaDependencies = new HashMap<>(); final List<JsonPropertyAdapter> list = ((JsonObjectValueAdapter)element).getPropertyList(); for (JsonPropertyAdapter property : list) { Collection<JsonValueAdapter> values = property.getValues(); if (values.size() != 1) continue; JsonValueAdapter value = values.iterator().next(); if (value == null) continue; if (value instanceof JsonArrayValueAdapter) { final List<String> dependencies = ((JsonArrayValueAdapter)value).getElements().stream() .filter(notEmptyString()) .map(el -> StringUtil.unquoteString(el.getDelegate().getText())).collect(Collectors.toList()); if (!dependencies.isEmpty()) propertyDependencies.put(property.getName(), dependencies); } else if (value.isObject()) { String newPointer = getNewPointer("dependencies/" + property.getName(), object.getPointer()); schemaDependencies.put(property.getName(), enqueue(queue, new JsonSchemaObject(virtualFile, newPointer), value)); } } object.setPropertyDependencies(propertyDependencies); object.setSchemaDependencies(schemaDependencies); } }; }