Actually, I want to use Castor to generate a bunch of java bean classes that, once instantiated, can be manipulated with JXPath (http://jakarta.apache.org/commons/jxpath), but JXPath relies on Collections as properties. Which seems fair enough as this is the Java standard. If my sequences implemented List then I could use the notation:
 
"/mySequence[3]/name"
 
to reference the name of the third object in my sequence.
 
I take it that it is not that simple then.
 
I can probably hack something together by extending a super class, but I don't really want to do it with ALL types, just the sequence ones.
 
Adam.
----- Original Message -----
Sent: Tuesday, February 04, 2003 1:37 PM
Subject: Re: [castor-dev] Implementing List

why exactly would you want a list for sequences?  Why are the get/set methods of every element in the sequence not enough?  Sometimes a sequence is exactly 6 elements.  You would have to make sure you always set element 5 to the right type or will get a runtime exception later.  Generating a List for a list makes sense, and in the JAXB spec, they have a getList() rather than implementing List I believe(You may want to verify with the JAXB spec)
Dean

Adam J Chesney wrote:
Hi,
 
Is it possible to get Castor to generate classes that implement java.util.List if that is appropriate (i.e. for sequences)?
 
If so, how would I do it? If not, why not? How difficult would it be to add?
 
Cheers,
 
Adam.
 
 
 
 
=====================================================
 
Tel:   (+44) 117 908 1254 (Direct)
Mobile (+44) 7780 962 961
email: [EMAIL PROTECTED]
 
This communication is intended solely for the addressee and is confidential.
If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful.
 
Although this e-mail and any attachments are believed to be free of any
virus, or any other defect which might affect any computer or IT system into
which they are received and opened, it is the responsibility of the
recipient to ensure that they are virus free and no responsibility is
accepted by Multicom Products Limited for any loss or damage arising in any
way from receipt or use thereof.

Reply via email to