private static boolean isDomElementMethod(PsiMethod psiMethod) {
    if (!psiMethod.hasModifierProperty(PsiModifier.PUBLIC) ||
        psiMethod.hasModifierProperty(PsiModifier.STATIC) ||
        psiMethod.isConstructor() ||
        psiMethod.getParameterList().getParametersCount() > 1) {
      return false;
    }

    final PsiClass containingClass = psiMethod.getContainingClass();
    if (containingClass == null) {
      return false;
    }

    if (!isDomElementClass(containingClass)) {
      return isDomElementVisitorMethod(psiMethod, containingClass);
    }

    final PsiType returnType = psiMethod.getReturnType();
    if (!(returnType instanceof PsiClassType returnClassType)) {
      return false;
    }

    // Dom getDom(), GenericAttributeValue<X> getAttr(), ...
    final PsiClass returnResolved = returnClassType.resolve();
    if (isDomElementInheritor(returnResolved)) {
      return true;
    }

    // List<Dom> getDoms()
    if (returnClassType.getParameterCount() == 1 &&
        InheritanceUtil.isInheritor(returnResolved, CommonClassNames.JAVA_UTIL_LIST)) {
      final PsiType listType = returnClassType.getParameters()[0];
      return isDomElementInheritor(listType);
    }

    return false;
  }
private static boolean isDomElementMethod(PsiMethod psiMethod)