users@jaxb.java.net

Re: Disable generating getter method

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Fri, 27 Oct 2006 10:34:12 -0700

HeruMartinus.Salim_at_infineon.com wrote:
> I had a problem that my generated codes have a getter methods which
> returning of the type of the generated classes (which is normal).
> And now I'm making a wrapper of these classes (which is the subclasses),
> I have problem while I must returning the classes of the wrappers. But
> when I try to override the getter methods, there are compile error that
> I cannot return different type when overriding.

JDK5 supports co-variant return type, so you should be able to override
the getter method to return a subtype. Can you cite a relevant portion
of the source code and error message?

> Or should I disable the generating of getter method? How to do it on the
> customization? I've looked to the documentation, but cannot find the
> expected part.

There's no out-of-box option to disable a getter generation, in short of
writing a plugin.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com