Self (@NonNls final String @NotNull ... attributeNames) { return with(new PatternCondition<>("withAnyAttribute") { @Override public boolean accepts(@NotNull final XmlTag xmlTag, final ProcessingContext context) { for (String attributeName : attributeNames) { if (xmlTag.getAttribute(attributeName) != null) { return true; } } return false; } }); }