protected @Unmodifiable <T extends PsiElement> List<T> findChildrenByType(@NotNull IElementType elementType) {
    List<T> result = Collections.emptyList();
    ASTNode child = getNode().getFirstChildNode();
    while (child != null) {
      if (elementType == child.getElementType()) {
        if (result == Collections.<T>emptyList()) {
          result = new ArrayList<>();
        }
        result.add((T)child.getPsi());
      }
      child = child.getTreeNext();
    }
    return result;
  }
protected @Unmodifiable <T extends PsiElement> List<T> findChildrenByType(@NotNull IElementType elementType)