users@jaxb.java.net

Re: fluent-api plugin - generic return types

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Thu, 12 Oct 2006 12:05:28 -0700

Hanson Char wrote:
> Hi Kenny,
>
> Is Y a Jaxb generated pojo ? Or a hand coded one ?
>
> How about the alternative of using method overriding with covariant
> return type in Y ? Example:
>
> class Y extends X {
> public Y withA(String a) {
> setA(a);
> return this;
> }
> }

+1.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com