public static boolean hasDefaultConstructor(@NotNull PsiClass clazz, boolean allowProtected, boolean allowPrivateAndPackagePrivate) {
    PsiMethod[] constructors = clazz.getConstructors();
    if (constructors.length == 0) {
      return true;
    }

    for (PsiMethod cls: constructors) {
      if ((cls.hasModifierProperty(PsiModifier.PUBLIC)
           || allowProtected && cls.hasModifierProperty(PsiModifier.PROTECTED)
           || allowPrivateAndPackagePrivate && !cls.hasModifierProperty(PsiModifier.PROTECTED))
          && cls.getParameterList().isEmpty()) {
        return true;
      }
    }
    return false;
  }
public static boolean hasDefaultConstructor(@NotNull PsiClass clazz, boolean allowProtected, boolean allowPrivateAndPackagePrivate)