users@jaxb.java.net

Re: How to use CopyBuilder?

From: Alex Wei <ozgwei_at_gmail.com>
Date: Sat, 11 Oct 2008 23:06:47 +1100

Thanks for the quick reply, lexi. :-)

Now my understanding is that jaxb2_commons will build several JARs, and one
is runtime.jar that include these two classes and another is basic.jar that
is required at build time for XJC to make the generated classes to implement
the Copyable interface.

These JARs are not related to the other plugins listed on the page, such as
fluent-api plugin, commons-lang plugin, etc.

Is this correct?

Cheers,
Alex


On Sat, Oct 11, 2008 at 10:11 PM, Aleksei Valikov <valikov_at_gmx.net> wrote:

> Hi.
>
> > From the CVS repository for jaxb2-commons, I found these two class
> > CopyBuilder and JAXBCopyBuilder in the
> > runtime/src/main/java/org.jvnet.jaxb2_commons.lang.builder package.
> >
> > Which JARs would I be able to find these two classes in?
> >
> > Can I use them to clone instances of JAXB-generated classes?
>
> Yes. See the jaxb2-commons/tests/one example for instance.
> You have to turn on the -Xcopyable plugin. The generated classes will
> then implement Copyable and CopyTo interfaces which allow copying of
> JAXB structures.
>
> Here's a couple of sample projects to get you started:
>
>
> http://download.java.net/maven/2/org/jvnet/jaxb2_commons/samples-basic-ant/0.4.1/samples-basic-ant-0.4.1-src.zip
>
> http://download.java.net/maven/2/org/jvnet/jaxb2_commons/samples-basic-maven/0.4.1/samples-basic-maven-0.4.1-src.zip
>
> Bye.
> /lexi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>