PsiExpression (@NotNull PsiReferenceExpression expression) { final PsiElement resolved = expression.resolve(); if (resolved instanceof PsiVariable variable) { if (variable.hasModifierProperty(PsiModifier.FINAL)) { return PsiUtil.skipParenthesizedExprDown(variable.getInitializer()); } } return null; }