PsiClass (PsiType type, PsiElement place) { if (type instanceof PsiClassType classType) { return classType.resolve(); } else if (type instanceof PsiPrimitiveType) { final PsiClassType boxed = ((PsiPrimitiveType)type).getBoxedType(place); if (boxed != null) return boxed.resolve(); else return null; } else { return null; } }