PsiClassType (PsiType type, PsiElement place) { if (type instanceof PsiClassType) { return (PsiClassType)type; } else if (type instanceof PsiPrimitiveType) { return ((PsiPrimitiveType)type).getBoxedType(place.getManager(), GlobalSearchScope.allScope(place.getProject())); } return null; }