boolean (@NotNull PsiModifierList modifierList) { final PsiElement modifierListParent = modifierList.getParent(); if (!(modifierListParent instanceof PsiField || modifierListParent instanceof PsiClass)) { return false; } PsiClass searchableClass = PsiTreeUtil.getParentOfType(modifierList, PsiClass.class, true); return null != searchableClass && PsiAnnotationSearchUtil.isAnnotatedWith(searchableClass, LombokClassNames.VALUE); }