boolean (@NotNull PsiElement element) { @Nullable PsiReferenceExpression psiReferenceExpression = PsiTreeUtil.getParentOfType(element, PsiReferenceExpression.class); if (psiReferenceExpression == null) { return false; } PsiElement psiElement = psiReferenceExpression.resolve(); if (!(psiElement instanceof PsiModifierListOwner)) { return false; } return PsiAnnotationSearchUtil.isAnnotatedWith((PsiModifierListOwner) psiElement, LombokClassNames.FIELD_NAME_CONSTANTS); }