public <T> T @NotNull [] findChildrenByClass(Class<T> aClass) {
    List<T> result = new ArrayList<>();
    for (PsiElement child : getChildren()) {
      if (aClass.isInstance(child)) {
        //noinspection unchecked
        result.add((T)child);
      }
    }
    return result.toArray(ArrayUtil.newArray(aClass, result.size()));
  }
public <T> T @NotNull [] findChildrenByClass(Class<T> aClass)