PsiPrimitiveType (PsiType type) { if (!(type instanceof PsiClassType)) return null; PsiUtil.ensureValidType(type); LanguageLevel languageLevel = ((PsiClassType)type).getLanguageLevel(); if (!languageLevel.isAtLeast(LanguageLevel.JDK_1_5)) return null; PsiClass psiClass = ((PsiClassType)type).resolve(); if (psiClass == null) return null; PsiPrimitiveType unboxed = ourQNameToUnboxed.get(psiClass.getQualifiedName()); if (unboxed == null) return null; return unboxed.annotate(type.getAnnotationProvider()); }