John Keiser wrote:
>
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Stuart Ballard
> >
> > FWIW, I strongly agree with John about protected classes. Protected
> > members of a class *ARE* part of the public API in Java. They are
> > included in the Javadocs just like public members. It's a fundamental
> > feature of Java that some APIs are used by extending the base classes,
> > and protected members are made available for precisely this reason. The
> > undocumented APIs are the package-private and private members, and we
> > certainly shouldn't include those - but protected members *are* part of
> > the public API, and *are* documented, and we *must* provide them if we
> > wish to be compatible.
> >
> > Sorry if this sounds aggressive, I just think full compatibility with
> > the documented Java spec is of *primary* importance to Classpath.
> >
> > Thanks for listening to my rant ;)
> >
>
> Can you show one example of a protected class in the documentation? I think
> that would settle this for good. Paul asserted that there were no protected
> classes in JavaDoc and concluded based on that that Sun didn't intend for
> protected classes to be part of the public API.
>
> --John Keiser
java.io.Reader and Writer have protected fields with objects to
synchronize on. I *think* that java.util.Vector has a protected Object[]
field containing its elements. java.util.AbstractList in 1.2RC1 has a
protected removeRange method. I know there are many more, but I can't
think of them off the top of my head.
I'm not sure about protected classes, because you can't have a protected
top-level class and as far as I know I've never seen a protected inner
class at all, but the same logic follows for classes as for fields and
methods.
Hope this helps,
Stuart.