Okay, understood. There's a property in the castorbuilder.properties that can 
be set to get a few more getter/setter methods generated for collections. Can 
you please try that one and see whether this matches your expectations ? 

Werner

PS In addition, I'd like to understand whether you have a particular reason to 
stay with a pre-1.x release, given that a lot of work has gone into making 1.0 
and 1.1 available.


> -----Ursprüngliche Nachricht-----
> Von: Davis, Jonathan [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 21. Mai 2007 23:36
> An: [email protected]
> Betreff: RE: [castor-user] How do I make get methods return ArrayLists?
> 
> I have Castor version 0.9.9.1
> 
> I am entering the following at the command prompt to create the files:
> 
> java org.exolab.castor.builder.SourceGenerator -i SCHEMA.xsd
> -binding-file SCHEMABinding.xml -types j2
> 
> The schema contains elements which have a reference to unbounded
> occurences of another element, and currently Castor creates ArrayLists
> for those, but then the 'get' method constructs and returns an Array
> instead of the ArrayList.
> 
> Thanks,
> Jonathan Davis
> 
> -----Original Message-----
> From: Werner Guttmann [mailto:[EMAIL PROTECTED]
> Sent: Sunday, May 20, 2007 4:22 PM
> To: [email protected]
> Subject: Re: [castor-user] How do I make get methods return ArrayLists?
> 
> Can I assume that you are using Ant and Castor's Ant task definition ?
> If so, what version(s) ?
> 
> Werner
> 
> Davis, Jonathan wrote:
> > I wish to make the get methods generated by Castor return ArrayLists
> > rather than Arrays. I am using the -types j2 option to make my data
> > types be ArrayLists rather than Vectors, but for every get method,
> > instead of returning the ArrayList it builds an Array and returns that
> 
> > instead. Is there any switch or flag or option to set to remedy this?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to