void (final UsageInfo[] usageArray, MultiMap<PsiElement, String> conflicts) { if (myParameterInitializer != null) { final ReferencedElementsCollector collector = new ReferencedElementsCollector(); myParameterInitializer.accept(collector); final Set<PsiElement> result = collector.myResult; if (!result.isEmpty()) { for (final UsageInfo usageInfo : usageArray) { if (usageInfo instanceof ExternalUsageInfo && IntroduceParameterUtil.isMethodUsage(usageInfo)) { final PsiElement place = usageInfo.getElement(); for (PsiElement element : result) { if (element instanceof PsiField && myReplaceFieldsWithGetters != IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_NONE) { //check getter access instead final PsiClass psiClass = ((PsiField)element).getContainingClass(); LOG.assertTrue(psiClass != null); final PsiMethod method = psiClass.findMethodBySignature(GenerateMembersUtil.generateGetterPrototype((PsiField)element), true); if (method != null){ element = method; } } if (element instanceof PsiMember && !JavaPsiFacade.getInstance(myProject).getResolveHelper().isAccessible((PsiMember)element, place, null)) { String message = JavaRefactoringBundle.message( "0.is.not.accessible.from.1.value.for.introduced.parameter.in.that.method.call.will.be.incorrect", RefactoringUIUtil.getDescription(element, true), RefactoringUIUtil.getDescription(ConflictsUtil.getContainer(place), true)); conflicts.putValue(element, message); } } } } } } }