boolean (PsiElementFactory factory, PsiType type) { if (isPrimitiveType(type)) { // test for simple type of boolean String s = type.getCanonicalText(); return "boolean".equals(s); } else { // test for Object type of Boolean return isTypeOf(factory, type, JAVA_LANG_BOOLEAN); } }