private void generateTypeParametersSection(StringBuilder buffer, PsiClass aClass) {
    List<ParamInfo> result = new ArrayList<>();
    PsiTypeParameter[] typeParameters = aClass.getTypeParameters();
    for (int i = 0; i < typeParameters.length; i++) {
      PsiTypeParameter typeParameter = typeParameters[i];
      String presentableParamName = generateOneTypeParameterPresentableName(typeParameter);
      DocTagLocator<PsiDocTag> locator = typeParameterLocator(i);
      Pair<PsiDocTag, InheritDocProvider<PsiDocTag>> inClassComment = findInClassComment(aClass, locator);
      if (inClassComment != null) {
        result.add(new ParamInfo(typeParameter.getName(), presentableParamName, inClassComment));
      }
      else if (!isRendered()) {
        Pair<PsiDocTag, InheritDocProvider<PsiDocTag>> inHierarchy = findInHierarchy(aClass, locator);
        if (inHierarchy != null) {
          result.add(new ParamInfo(typeParameter.getName(), presentableParamName, inHierarchy));
        }
      }
    }
    generateParametersSection(buffer, JavaBundle.message("javadoc.type.parameters"), result);
  }
private void generateTypeParametersSection(StringBuilder buffer, PsiClass aClass)