> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> Brian Jones
>
> "Aaron M. Renn" <[EMAIL PROTECTED]> writes:
>
> > >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.
> >
> > Not an entire class, but there are many, many protected methods
> and fields.
> > Also, there are clear references to "internal" classes.  For example,
> > java.net.SocketImpl implements and undocumented interface called
> > "SocketOptions".
>
> Under 1.2rc1 SocketOptions is a public abstract interface which is
> documented.
>
> I've grepped through all of the java/*/* javadoc and can't find an
> instance of a protected class.  However, there are numerous examples
> under the javax.swing hierarchy such as
> javax.swing.ToolTipManager.insideTimerAction.
>

Let's just use that as an indication that protected classes are allowed.
It's dictated by logic and confirmed in some of the JavaDoc.  I can see no
argument against it unless it specifically states that protected classes
under java.* are not part of the API.  I doubt anyone will find that
statement.  Sun often uses "public API" to mean "anything which could be
accessed outside of java.* using Java language access rules," as many times
members are protected but still part of the public API.
--John Keiser


Reply via email to