public static void generateTypeParameters(
    PsiTypeParameterListOwner typeParameterOwner,
    StringBuilder buffer,
    JavaDocHighlightingManager highlightingManager
  ) {
    if (typeParameterOwner.hasTypeParameters()) {
      PsiTypeParameter[] params = typeParameterOwner.getTypeParameters();

      appendStyledSignatureFragment(buffer, "&lt;", highlightingManager.getOperationSignAttributes());

      for (int i = 0; i < params.length; i++) {
        PsiTypeParameter p = params[i];

        appendStyledSignatureFragment(buffer, p.getName(), highlightingManager.getTypeParameterNameAttributes());
        PsiClassType[] refs = p.getExtendsList().getReferencedTypes();

        if (refs.length > 0) {
          appendStyledSignatureFragment(buffer, " extends ", highlightingManager.getKeywordAttributes()); // <- Groovy keyword

          for (int j = 0; j < refs.length; j++) {
            JavaDocInfoGeneratorFactory.create(typeParameterOwner.getProject(), null)
              .generateType(buffer, refs[j], typeParameterOwner, false, true);

            if (j < refs.length - 1) {
              appendStyledSignatureFragment(buffer, " & ", highlightingManager.getOperationSignAttributes());
            }
          }
        }

        if (i < params.length - 1) {
          appendStyledSignatureFragment(buffer, ", ", highlightingManager.getCommaAttributes());
        }
      }

      appendStyledSignatureFragment(buffer, "&gt;", highlightingManager.getOperationSignAttributes());
    }
  }
public static void generateTypeParameters(
    PsiTypeParameterListOwner typeParameterOwner,
    StringBuilder buffer,
    JavaDocHighlightingManager highlightingManager
  )