PatternCondition<T> (final ElementPattern pattern) { return new PatternConditionPlus<T, String>("_withText", pattern) { @Override public boolean processValues(T t, ProcessingContext context, PairProcessor<? super String, ? super ProcessingContext> processor) { return processor.process(t.getText(), context); } }; }