Chris Uppal <> wrote:
: Dale King wrote:
:> > That's a generic problem with using Java interfaces - if you
:> > implement them the world and his wife gets to use them - which
:> > is not necessarily what the programmer wants.
:>
:> Not strictly true. While all members of the interface are public, the
:> interface itself may not be.
: Agreed, and if that's not a clear indication that the spec is
: misconceived then I don't know what would be.
: IMO the condition *should* be that the members required by an interface
: must be at least as accessible as the interface itself.
That wouldn't help with the Cloneable problem. There
we want the inteface to be public - so anyone can use it.
However we don't want to place the burden of making their clone
method public on all the implementors of Cloneable.
So that seems like a case where the member(s) of the interface
ought to be /less/ accessible than the interface itself.
--
__________
|im |yler
http://timtyler.org/