It keeps us think about the API and extension points provided. I
personally prefer it this way, because it is much harder to close a
gap than open a new door if needed. The public API is much smaller
this way and more importantly, it is under our control. It is similar
to access protection, imo.

Juergen


On Mon, 03 Jan 2005 10:13:04 -0500, Gili <[EMAIL PROTECTED]> wrote:
> 
>        Why should setParent() be a final method? In fact, aren't you
> guys using "final" on your classes and methods a bit too aggressively?
> 
> Gili
> 
> On Mon, 03 Jan 2005 12:25:56 +0100, Eelco Hillenius wrote:
> 
> >Why is it important that a parent, once set, may never be changed?
> >
> >    final void setParent(final Container parent)
> >    {
> >        if (this.parent == null || parent == null)
> >        {
> >            this.parent = parent;
> >        }
> >        else
> >        {
> >            throw new IllegalStateException(exceptionMessage("Cannot
> >change parent once set"));
> >        }
> >    }
> >
> >I have a concrete usecase, where I remove and recreate all childs of a
> >border, except - as I work with a menu-like component - for a 'current'
> >panel, that I just want to re-add.
> >
> >I'd like to propose:
> >
> >    final void setParent(final Container parent)
> >    {
> >        this.parent = parent;
> >    }
> >
> >Objections anyone?
> >
> >Eelco
> >
> >
> >-------------------------------------------------------
> >The SF.Net email is sponsored by: Beat the post-holiday blues
> >Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> >It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> >_______________________________________________
> >Wicket-develop mailing list
> >[email protected]
> >https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by: Beat the post-holiday blues
> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
> _______________________________________________
> Wicket-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to