dev@jaxb.java.net

Re: XJC: get the narrowed class of an JClass or an JFieldVar

From: Florian Bachmann <f.bachmann_at_micromata.de>
Date: Mon, 23 Nov 2009 16:40:11 +0100

Hi /lexi (:
just one problem JNarrowedClass is not public.
As result JNarrowedClass type = (JNarrowedClass) jFieldVar.type(); fails.

Do you have any other suggestions? Or is it possible to make JNarrowedClass public?

regards
Flori

On 23.11.2009, at 16:34, Aleksei Valikov wrote:

> Hi,
>
>> Is there an easy way, to get the narrowed classes? Like getNarrowedClasses()
>> that return in the case of ArrayList<String> the String-class?
>
> Narrowed classes are instances of JNarrowedClass, you can cast to this
> class and use the getTypeParameters() method.
>
> MfG,
> /lexi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: dev-help_at_jaxb.dev.java.net
>

--
Florian Bachmann, Softwareentwicklung
Micromata GmbH
Hauptsitz: Marie-Calm Str. 1-5, D-34131 Kassel
Niederlassung Bonn: Menuhinstr. 8, 53113 Bonn
Tel: +49 561 / 31 67 93 - 0
Fax: +49 561 / 31 67 93 - 11
mailto: f.bachmann_at_micromata.com
http://www.micromata.com
AG Kassel HRB 7370
Geschäftsführung:
Dipl.-Ing. Thomas Landgraf
Dipl.-Phys. Kai Reinhard