commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Heuer <heue...@acm.org>
Subject Re: [collections] Serializable decorators
Date Tue, 06 Apr 2004 21:25:37 GMT

non-binding +1 to #1.

All the wrapper methods in java.util.Collections note

The returned xxx will be serializable if the specified xxx is
serializable.

in their javadocs and the wrapper classes appear follow this design.

   michael


On Tue, 6 Apr 2004, Stephen Colebourne wrote:

> I had a look at making the decorators serializable, and it will take some
> time (tedious mostly). However I did find a design decision.
>
> The collection that a decorator decorates may or may not be serializable.
> But does the decorator need to represent this? This leads to two options.
>
> 1) Make all decorators implement serializable, but some will fail at runtime
> if you decorate a non-serializable instance.
>
> 2) Implement serializable subclasses of each decorator, and use the factory
> method to create either the serializable or non-serializable subclass as
> required.
>
> #1 is easy, #2 will take much longer. Any views? #1 is the default choice.
>
> Stephen
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message