GenericDomValuePattern<T> (final ElementPattern<String> pattern) { return with(new PatternCondition<>("withStringValue") { @Override public boolean accepts(@NotNull final GenericDomValue<T> genericDomValue, final ProcessingContext context) { return pattern.accepts(genericDomValue.getStringValue(), context); } }); }