@Override
  protected Object @NotNull [] buildChildren(@NotNull HierarchyNodeDescriptor descriptor) {
    PsiElement psiElement = ((MethodHierarchyNodeDescriptor)descriptor).getPsiClass();
    if (!(psiElement instanceof PsiClass psiClass)) return ArrayUtilRt.EMPTY_OBJECT_ARRAY;
    Collection<PsiClass> subclasses = getSubclasses(psiClass);

    List<HierarchyNodeDescriptor> descriptors = new ArrayList<>(subclasses.size());
    HierarchyBrowserManager.State state = HierarchyBrowserManager.getInstance(myProject).getState();
    boolean hideNotImplemented = state != null && state.HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED;
    for (PsiClass aClass : subclasses) {
      if (hideNotImplemented) {
        if (shouldHideClass(aClass)) {
          continue;
        }
      }

      MethodHierarchyNodeDescriptor d = new MethodHierarchyNodeDescriptor(myProject, descriptor, aClass, false, this);
      descriptors.add(d);
    }

    PsiMethod existingMethod = ((MethodHierarchyNodeDescriptor)descriptor).getMethod(psiClass, false);
    if (existingMethod != null) {
      FunctionalExpressionSearch.search(existingMethod).forEach(expression -> {
        descriptors.add(new MethodHierarchyNodeDescriptor(myProject, descriptor, expression, false, this));
        return true;
      });
    }

    return descriptors.toArray(HierarchyNodeDescriptor.EMPTY_ARRAY);
  }
@Override
  protected Object @NotNull [] buildChildren(@NotNull HierarchyNodeDescriptor descriptor)