Can something like AspectJ change the type of instantiated classes? -Yonik http://www.lucidimagination.com
On Fri, Jun 12, 2009 at 9:11 AM, Simon Willnauer<simon.willna...@googlemail.com> wrote: > Hey there, > > I have a had quite a couple of usecases where I had to change some > tiny things in basic queries like BooleanQuery. I subclassed those > queries and applied the change - no problem so far. But I wanted > lucene to use this modified query everywhere in other queries and (for > sure) in the query parser. The query parser integration was easy - > subclassed it and override new*Query() methods. The rest of lucene was > a nightmare and I eventually used a source distribution and changed it > in the actual implementation - don't comment this, I hate it! > I thought about this topic for a while and want to throw it out to the > list for discussion. > > I would really appreciate to see some kind of factory methods used for > query construction for instance in the Query#rewrite() implementations > as well as in the QueryParser classes. Such a factory could be user > provided or by default simple call the constructor of the target > class. A patch for this would not break and backwards compat. afaik > and could help quite a couple of people out there I guess. > > simon --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org