users@jaxb.java.net

custom AnnotationReader

From: Herve Bitteur <Herve.Bitteur_at_Sun.COM>
Date: Mon, 13 Nov 2006 13:10:51 +0100

Hi,

Speaking of a "custom AnnotationReader to read annotations from an
external file", this might be the right approach for handling Java
sources the user cannot annotate. We had a discussion a few days ago
about marshalling JRE classes such as classes Point or Dimension in
java.awt package. For example, how can we specify that we'll use
attributes rather than elements? In the case of "non-annotable" classes,
some external file could be the answer.

Just my 2 cents
/Hervé
>
> Subject:
> Re: Making JAXBContextImpl serializable
> From:
> Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
> Date:
> Fri, 10 Nov 2006 11:57:40 -0800
> To:
> users_at_jaxb.dev.java.net
>
> To:
> users_at_jaxb.dev.java.net
>
>
> Kohsuke Kawaguchi wrote:
>> I should see what's going on in your profile that's taking long...
>
> I made one more minor improvement, but it looks like the rest is
> mostly dominated by the reflection, so without taking more drastic
> measure, this seems like the best we can get for now.
>
> One possibility is to use a custom AnnotationReader to read
> annotations from an external file or something. That might be faster
> than using reflection.
>
> The other possibility is to analyze JAXB bound classes lazily, but
> that has a spec-related problem of not being able to detect errors
> early enough (which might be acceptable for enough audience, though)
> and it probably takes a significant modification of the RI.
>

-- 
<http://www.sun.com> 	*Hervé Bitteur*
Software Program Manager
*Sun Microsystems, Inc.*
13, Avenue Morane Saulnier
78142 Vélizy Cedex FRANCE
Phone +33 1 34 03 01 12
Mobile +33 6 86 49 04 14
Fax     +33 1 34 03 07 56
Email   herve.bitteur_at_sun.com
Skype hbitteur <skype:hbitteur?call>