commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [VOTE] Release Imaging 1.0 from RC7
Date Tue, 26 Nov 2013 13:44:39 GMT
On Tue, Nov 26, 2013 at 12:31 AM, Damjan Jovanovic <damjan@apache.org>wrote:

> On Mon, Nov 25, 2013 at 1:50 PM, Emmanuel Bourg <ebourg@apache.org> wrote:
>
> [Snip]

>
> > - The PixelParser classes in
> > org.apache.commons.imaging.formats.bmp.pixelparsers seems to be used
> > only internally by BmpImageParser. They can't be made package private
> > but could at least be excluded from the Javadoc.
>
> Hidden Javadocs don't hide packages from IDE code completion. There is
> only 2 choices w.r.t. packages: keeping everything in one package to
> hide internal classes by giving them package private access, and
> keeping classes in different packages to better structure code but
> then having to make them public as a result (and choice 3, a pipe
> dream, use OSGi and don't export the packages with internal classes).
> Maybe a public factory method in a public base class returning
> package-private subclasses would work?
>
>
>
The third choice is to have an '.internal' package à la Eclipse. The
package could also be called '.private' or '.impl'.  You can have one or
more such package of course.

You get the best of both world, cleaner organization of code and a red
flashing sign that says 'this is in an internal package, use at your own
risk.' In fact the current Javadocs comments could all be prefixed with
such a message.

Gary

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message