void (@NotNull PsiAnnotation psiAnnotation, @NotNull PsiField psiField, @NotNull ProblemSink problemSink, @NotNull String parameterName) { if (problemSink.deepValidation()) { final @NotNull List<PsiAnnotation> copyableAnnotations = LombokCopyableAnnotations.BASE_COPYABLE.collectCopyableAnnotations(psiField); if (!copyableAnnotations.isEmpty()) { final Iterable<String> onXAnnotations = LombokProcessorUtil.getOnX(psiAnnotation, parameterName); List<String> copyableAnnotationsFQNs = ContainerUtil.map(copyableAnnotations, PsiAnnotation::getQualifiedName); for (String copyableAnnotationFQN : copyableAnnotationsFQNs) { for (String onXAnnotation : onXAnnotations) { if (onXAnnotation.startsWith(copyableAnnotationFQN)) { problemSink.addErrorMessage("inspection.message.annotation.copy.duplicate", copyableAnnotationFQN); } } } } if (psiField.isDeprecated()) { final Iterable<String> onMethodAnnotations = LombokProcessorUtil.getOnX(psiAnnotation, "onMethod"); if (ContainerUtil.exists(onMethodAnnotations, CommonClassNames.JAVA_LANG_DEPRECATED::equals)) { problemSink.addErrorMessage("inspection.message.annotation.copy.duplicate", CommonClassNames.JAVA_LANG_DEPRECATED); } } } }