boolean (PsiExpression expr) { final PsiType type = expr.getType(); if (type instanceof PsiPrimitiveType) { return false; } if (type instanceof PsiClassType) { final PsiClass psiClass = ((PsiClassType)type).resolve(); if (psiClass != null && psiClass.hasModifierProperty(PsiModifier.FINAL)) { return false; } } return true; }