public @NlsSafe String generateSignature(PsiElement element) {
    StringBuilder buf = new StringBuilder();
    if (element instanceof PsiClass cls) {
      if (generateClassSignature(buf, cls, SignaturePlace.ToolTip)) return null;
    }
    else if (element instanceof PsiField field) {
      generateFieldSignature(buf, field, SignaturePlace.ToolTip);
    }
    else if (element instanceof PsiMethod method) {
      generateMethodSignature(buf, method, SignaturePlace.ToolTip);
    }
    return buf.toString();
  }
public @NlsSafe String generateSignature(PsiElement element)