users@jaxb.java.net

Re: Finding implementation class from FieldOutline?

From: Colin Fleming <colin.mailinglist_at_gmail.com>
Date: Tue, 16 Dec 2008 12:57:57 +0100

Great, thanks Lexi, I'll try that out. I figured it had to be something
similar, but couldn't find the connection I needed.

Cheers,
Colin

2008/12/16 Aleksei Valikov <valikov_at_gmx.net>

> Hi.
>
> > I'm trying to write a plugin for a class generated from schema
> > (AbstractPreferences) that we've customised like this:
> >
> > <jaxb:class implClass="service.prefs.impl.PreferencesImpl"/>
> >
> > where PreferencesImpl is a hand-written class. This works somewhat, the
> > ObjectFactory correctly returns a PreferencesImpl in
> > createAbstractPreferences(). However I have two problems:
> >
> > 1. AbstractPreferences also has a list of child elements of the same
> type,
> > but this is generated as a List<AbstractPreferences>, not a
> > List<PreferencesImpl> - is this correct? It seems like this should be a
> list
> > of PreferencesImpl.
>
> I think it gets the "least common denominator" from possible classes.
>
> > 2. From the plugin, when I attempt to customise the "children" field
> using
> > the FieldOutline I can't find any way to find out what the implementation
> > class of the list element type is. Is there a way to get at this
> > information?
>
> Oh, it's a bit hard and I don't have a workspace handy.
> You can get this information from the underlying CPropertyInfo, look
> for getTypes() method or something like this. You can get CClassInfo
> of the element from there and the use the outline to check which
> ClassOutline was generated for this class info.
>
> Let me know if you have further difficulties, I'll try to help.
>
> Bye.
> /lexi
>
> 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
>
>