void (@NotNull final RefField refField) { if (problemsProcessor.getDescriptions(refField) == null) return; if (PsiModifier.PRIVATE.equals(refField.getAccessModifier())) return; globalContext.enqueueFieldUsagesProcessor(refField, new GlobalJavaInspectionContext.UsagesProcessor() { @Override public boolean process(PsiReference psiReference) { PsiElement expression = psiReference.getElement(); if (expression instanceof PsiReferenceExpression && PsiUtil.isAccessedForWriting((PsiExpression)expression)) { ((RefFieldImpl)refField).setFlag(false, CanBeFinalAnnotator.CAN_BE_FINAL_MASK); problemsProcessor.ignoreElement(refField); return false; } return true; } }); }