Self (@NotNull @NonNls final String attributeName, @NotNull final String attributeValue) { return with(new PatternCondition<>("withAttributeValue") { @Override public boolean accepts(@NotNull final XmlTag xmlTag, final ProcessingContext context) { return Objects.equals(xmlTag.getAttributeValue(attributeName), attributeValue); } }); }