users@jaxb.java.net

Re: XMLEncoder and complexType elements

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 16 Jan 2007 14:50:00 -0800

Marcos wrote:
> Q1) Do you know some plugin that performs this ? or I've to write my own ?

I don't know any. If you write one, please consider to host it on
http://jaxb2-commons.dev.java.net/

> Q2) Is safe to put a setter method for these List based properties such as.:
>
> public List<Object> getSqlOrDefinitionIncludeOrImportDefinition() {
> if (sqlOrDefinitionIncludeOrImportDefinition == null) {
> sqlOrDefinitionIncludeOrImportDefinition = new
> ArrayList<Object>();
> }
> return this.sqlOrDefinitionIncludeOrImportDefinition;
> }
>
> /* Is this method safe ?.*/
> public void setSqlOrDefinitionIncludeOrImportDefinition(List<Object>
> sqlOrDefinitionIncludeOrImportDefinition){
> this.sqlOrDefinitionIncludeOrImportDefinition =
> sqlOrDefinitionIncludeOrImportDefinition;
> }

Looks OK to me.


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com