On Sat, 1 Dec 2001 11:04, Michael McKibben wrote:
> One way to accomplish what you are trying to do is to make the state java
> object, e.g. ComponentState, that has instance methods for validating the
> component's state.
>
> Usage pattern would then be something like:
>
> // Checks what lifecycle interfaces are implemented and returns the
> // initial state
> private ComponentState state = new ComponentState(this);
>
> Thenthe  user would call the check methods for component state validation
>
> state.configure();
> state.initialize();
> state.start();
> state.stop();
> state.dispose();
>
> // invalid state, throws some type of IllegalStateException
> state.initialize();
>
> Anyway, just a thought. Another idea would be to make the state object
> opaque and passed into the static check methods of ComponentUtil. What do
> you think?

I like that better than inheritance ! ;)

-- 
Cheers,

Pete

----------------------------------------------------
"The only way to discover the limits of the possible 
is to go beyond them into the impossible." 
                             -Arthur C. Clarke
----------------------------------------------------

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

Reply via email to