users@jaxb.java.net

Re: XMLEncoder and complexType elements

From: Hanson Char <hanson.char_at_gmail.com>
Date: Tue, 16 Jan 2007 15:13:58 -0800

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

I would say the closest thing is the existing Fluent API plugin, which
currently generates a withXXX method for those collection arguments instead
of the setXXX method. You can use that as a reference/starting point.

Hanson

On 1/16/07, Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_sun.com> wrote:
>
> 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
>
>
>