private static boolean isValidTypeForSwitchSelector(@NotNull PsiType type) {
    if (TypeConversionUtil.getTypeRank(type) <= TypeConversionUtil.INT_RANK) {
      return true;
    }

    PsiClass aClass = PsiUtil.resolveClassInClassTypeOnly(type);
    if (aClass != null && aClass.isEnum()) {
      return true;
    }

    return false;
  }
private static boolean isValidTypeForSwitchSelector(@NotNull PsiType type)