private boolean generateClassSignature(StringBuilder buffer, PsiClass aClass, SignaturePlace place) {
    boolean generateLink = place == SignaturePlace.Javadoc;
    String classKeyword =
      aClass.isInterface() ? PsiKeyword.INTERFACE :
      aClass.isEnum() ? PsiKeyword.ENUM :
      aClass.isRecord() ? PsiKeyword.RECORD : PsiKeyword.CLASS;

    generateAnnotations(buffer, aClass, place, true, false, true);
    generateModifiers(buffer, aClass, false);
    if (aClass.isAnnotationType()) {
      buffer.append("@");
    }
    appendStyledSpan(buffer, getHighlightingManager().getKeywordAttributes(), classKeyword);
    buffer.append(' ');
    String refText = JavaDocUtil.getReferenceText(aClass.getProject(), aClass);
    if (refText == null) {
      buffer.setLength(0);
      return true;
    }
    String className = JavaDocUtil.getLabelText(aClass.getProject(), aClass.getManager(), refText, aClass);
    appendStyledSpan(buffer, getHighlightingManager().getClassDeclarationAttributes(aClass), className);

    buffer.append(generateTypeParameters(aClass, false));

    buffer.append('\n');

    PsiClassType[] refs = aClass.getExtendsListTypes();
    if (aClass.isEnum()) {
      refs = Arrays.stream(refs)
        .filter(it -> {
          PsiClass resolved = it.resolve();
          return resolved == null || !"java.lang.Enum".equals(resolved.getQualifiedName());
        })
        .toArray(PsiClassType[]::new);
    }
    if (refs.length > 0) {
      generateRefList(buffer, aClass, generateLink, refs, "extends");
      buffer.append('\n');
    }

    refs = aClass.getImplementsListTypes();
    if (refs.length > 0) {
      generateRefList(buffer, aClass, generateLink, refs, "implements");
      buffer.append('\n');
    }
    if (buffer.charAt(buffer.length() - 1) == '\n') {
      buffer.setLength(buffer.length() - 1);
    }
    return false;
  }
private boolean generateClassSignature(StringBuilder buffer, PsiClass aClass, SignaturePlace place)