public static boolean isBooleanType(PsiElementFactory factory, PsiType type) {
      return PsiTypes.booleanType().equals(type) || type.equalsToText("java.lang.Boolean");
    }
public static boolean isBooleanType(PsiElementFactory factory, PsiType type)