avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <blorit...@apache.org>
Subject [A5] Parameters Package
Date Sat, 15 Jun 2002 15:01:12 GMT
I see nothing wrong about the Parameters package as a general rule, just
a
couple questions:

1) Do we want to decouple the Parameters interface from the Parameters
object
   like we do with Configuration?

2) Are we going to explicitly declare Parameterizable and Configurable
as
   mutually exclusive?

As to #1, it would provide consistency and provide a nice way of making
different implementations of the parameters object.  It would also
encourage
us to place the Parameters.fromProperties() and
Parameters.fromConfiguration()
methods into a ParameterUtils class.

I am +1.

As to #2, I believe that is what we intended to do in the first place.
The
problem is that there is no way to programatically enforce it without
the
ContainerUtils or some other helper class.  If it is mutually exclusive,
we have to specify that in the javadocs--and say that if a component
extends
both Configurable and Parameterizable the result is undefined.

Something like the text below:

"WARNING: The Parameterizable interface is mutually exclusive of the
 Configurable interface.  If your component extends both of those
 interfaces, the behavior is undefined.  The container is free to throw
 an exception and refuse to use your component, or to pass an object
 in to both methods.  The object may be empty.  In short do not mix
 these two interfaces in your components."

Any other concerns?


"They that give up essential liberty to obtain a little temporary safety
 deserve neither liberty nor safety."
                - Benjamin Franklin


--
To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>


Mime
View raw message