boolean (@Nullable PsiType type, PsiElement context) { if (type instanceof PsiClassType) { PsiClass resolvedClass = ((PsiClassType)type).resolve(); if (resolvedClass == null) { return false; } return (PsiUtil.isLanguageLevel5OrHigher(context) && (resolvedClass.isEnum() || isSuitablePrimitiveType(PsiPrimitiveType.getUnboxedType(type)))) || (PsiUtil.isLanguageLevel7OrHigher(context) && CommonClassNames.JAVA_LANG_STRING.equals(resolvedClass.getQualifiedName())); } return isSuitablePrimitiveType(type); }