lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <>
Subject Re: The distinction between a Wrapper and a Filter
Date Thu, 15 Nov 2012 13:05:08 GMT

On Thu, Nov 15, 2012 at 11:52 AM, Shai Erera <> wrote:
> Several objects introduce a Filter/Wrapper, which essentially act as
> delegators. E.g. FilterDirectory, FilterCodec, FilterAtomicReader, and
> while not strictly a delegator - SlowCompositeReaderWrapper.
> I would like to rename all the above Filters to Wrappers, e.g.
> DirectoryWrapper, CodecWrapper and AtomicReaderWrapper, b/c I think that
> better reflects what they do. *Delegator is less preferable, but I'm
> willing to live with it too.

On the one hand I think it is good to use the same naming convention for
our decorators as the API (see FilterInputStream[1] docs for
example) but on the other hand I was confused too when I first read about
these classes, so I would be supportive if we decide to change the naming
convention for 5.0. Maybe we could use something more descriptive than
*Wrapper? (I personally like Guava's naming convention to prefix their
decorators by "Forwarding".)



View raw message