private static @Nullable @NonNls String findTemplateNameByElement(PsiJavaDocumentedElement commentOwner){
    if (commentOwner instanceof PsiMethod method) {
      if (method.isConstructor()) {
        return JavaTemplateUtil.TEMPLATE_JAVADOC_CONSTRUCTOR;
      }
      else if (method.findSuperMethods().length > 0) {
        return JavaTemplateUtil.TEMPLATE_JAVADOC_OVERRIDING_METHOD;
      }
      else {
        return JavaTemplateUtil.TEMPLATE_JAVADOC_METHOD;
      }
    }
    else if (commentOwner instanceof PsiField) {
      return JavaTemplateUtil.TEMPLATE_JAVADOC_FIELD;
    }
    else if (commentOwner instanceof PsiClass) {
      return JavaTemplateUtil.TEMPLATE_JAVADOC_CLASS;
    }
    return null;
  }
private static @Nullable @NonNls String findTemplateNameByElement(PsiJavaDocumentedElement commentOwner)