void (@NotNull String modifier, @NotNull PsiModifierListOwner parameter, final ProblemHighlightType highlightType, Object... infos) { final PsiModifierList modifiers = parameter.getModifierList(); if (modifiers == null) { return; } final PsiElement[] children = modifiers.getChildren(); for (final PsiElement child : children) { final String text = child.getText(); if (modifier.equals(text)) { registerError(child, highlightType, infos); } } }