127128129130131132133134135136137
} protected TokenCollector createTokenCollector() { switch (mode) { case WRITER_MODE: return new WriterTokenCollector(); case QUERY_MODE: return new QueryTokenCollector(); default: throw new IllegalArgumentException("wrong mode"); }