Self (@NotNull final ElementPattern<? extends Collection<XmlTag>> pattern) { return with(new PatternCondition<>("withSubTags") { @Override public boolean accepts(@NotNull final XmlTag xmlTag, final ProcessingContext context) { return pattern.accepts(Arrays.asList(xmlTag.getSubTags()), context); } }); }