void (PsiMethod method) { PsiDocComment comment = method.getDocComment(); if (comment == null) { return; } List<ReturnItem> items = extractValues(comment); String commentText = comment.getText(); for (ReturnItem item : items) { String valueText = item.range.substring(commentText); String incompatibleMessage = getIncompatibleMessage(valueText, item.kind, method); if (incompatibleMessage != null) { holder.registerProblem(comment, item.range, incompatibleMessage); } } }