JsonValueAdapter (@NotNull YAMLValue value) { if (value instanceof YAMLAlias) { PsiElement result = YamlObjectAdapter.resolveYamlAlias(value); if (result instanceof YAMLValue) { JsonValueAdapter adapter = RecursionManager.doPreventingRecursion(value, false, () -> createValueAdapterByType((YAMLValue)result)); if (adapter != null) return adapter; } } if (value instanceof YAMLMapping) return new YamlObjectAdapter((YAMLMapping) value); if (value instanceof YAMLSequence) return new YamlArrayAdapter((YAMLSequence) value); return new YamlGenericValueAdapter(value); }