users@jaxb.java.net

Re: IDREF, ID and xjc:idSymbolSpace

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 03 Jan 2005 17:31:44 -0800

Kees wrote:
> In EquipmentEntityImpl.java the method
> "public generated.gti.conf.EquipmentType getEquipmentType()" is generated.
> I would expect that
> "public gti.conf.EquipmentType getEquipmentType()" is generated.
>
> Am I missing something here?

I'm sympathetic to your frustration.

The reason for this is that the methods generated on the interfaces only
refer to other interfaces, and never implementation classes.

It is very clunky that you have to cast to your impl class every time
you get an object from the content interfaces, but that is true with all
the generated signatures, not just this symbol space customization.

So I don't think changing this particular one is a good idea.


In 2.0, XJC will be able to just generate value classes, so there won't
be any casting between your class and interfaces. Also, in 2.0, you can
have XJC generate the code once, move that into the repository, and then
you can start making modifications to the generated classes directly. So
  when this kind of problems come up, instead of learning a new
customization, you can just go ahead and change the signature of the
generated code and it will still work.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net