@Override
  public final Object @NotNull [] getChildElements(@NotNull Object element) {
    if (element instanceof HierarchyNodeDescriptor descriptor) {
      Object[] cachedChildren = descriptor.getCachedChildren();
      if (cachedChildren == null) {
        if (descriptor.isValid()) {
          try {
            cachedChildren = buildChildren(descriptor);
          }
          catch (IndexNotReadyException e) {
            return ArrayUtilRt.EMPTY_OBJECT_ARRAY;
          }
        }
        else {
          cachedChildren = ArrayUtilRt.EMPTY_OBJECT_ARRAY;
        }
        descriptor.setCachedChildren(cachedChildren);
      }
      return cachedChildren;
    }
    return ArrayUtilRt.EMPTY_OBJECT_ARRAY;
  }
@Override
  public final Object @NotNull [] getChildElements(@NotNull Object element)