On Sat, Apr 26, 2008 at 4:55 PM, Maurice Marrink <[EMAIL PROTECTED]> wrote:
>  Such an initialize method can easily be done by users them self with a
>  simple factory pattern. So why bloat our api with it?

Could one come up with their own interface which means they want
delayed intialization and use an IComponentInstantiationListener to
invoke the method?

public interface Initializable
{
  public void initialize();
}

public class InitializableInstantiationListener implements
IComponentInstantiationListener
{
  public void onInstantiation(Component component)
  {
    if(component instanceof Initializable)
    {
      ( ( Initializable )component ).initialize();
    }
  }
}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to