users@jaxb.java.net

Re: Multiple internal lists for xs:choice mapping?

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 16 Aug 2005 11:25:48 -0700

Aleksei Valikov wrote:
> Hi.
>
>> The attached FilterList class allows you to do what you want.
>>
>> Given a heterogeneous list of B,C,D, and E, it gives a live updatable
>> view limited to just one type. You'd do:
>>
>> List list = obj.getBorCorDorE();
>> List bList = new FilterList(list,B.class);
>>
>> bList and list shared the underlying storage, so any change you made on
>> one side is going to be visible on the other side.
>>
>> I have a few utility code like this, and I'm wondering where to put
>> them. If other people are interested in contributing those little code
>> pieces, maybe we should have the jaxb-utils project.
>
> This could be put into the existing jaxbcommons project.

Ah, yes, that might be a good idea.

I checked the project, and I noticed that it's mostly development-time
tools (like addons.)

Would it be possible to restructure the repository a bit so that we can
have the runtime utilities (like FilterList) and compile-time utilities
separately?

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com