Understood martin; I often run with Java 6. The reason I am suggestion a plug-in module is not because of jaxb being bad; or even introducing a new dependency ... I want to treat any of our uses cases involving annotations with the same even approach.
I am trying to do two things: a) Answer the question in such a way as we can live with it long term - lots of libraries use annotations to hook into implementation classes; after all if jaxb gets special treatment how are we going to answer: - http://www.javaworld.com/javaworld/jw-06-2006/jw-0626-jaxb.html - http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/ - http://xstream.codehaus.org/annotations-tutorial.html - the list is going to keep going ... b) Check if our design approach (ie factories) is good enough to handle the above explosion of annotation based creativity. If you wanted first hand experience of why Collection< ? extends Citation> is needed *this* is your use case. This may be another case where our needs (subclassing 100 classes) do not mesh well with current Java fashion. Partial solutions like Dynamic Beans filled in with the right annotation information also seem lame. We did deliberately design for this problem with the use of factories; lets see if we like the result. Jody > Jody Garnett a écrit : > >> So far our factory design has served us well (allowing the >> hibernate 4 annotations to live on a specific implementation and not >> impact the rest of the code base). Can you give this technique a try >> Martin? >> > We could, but it would leads to a brand new set of implementation classes. My > goal was to add annotation on existing classes in order to avoid the > duplication > of ~100 new classes. > > The JAXB dependencies is actually JAXB-API only, which is 88 kb. But as I > explained in my previous mail, I can avoid totally the introduction of any > dependency, on the base that JAXB 2.0 is bundled in Java 6 and, for Java 5 > users, we can manage to get annotations totally erased in the compiled > products > thanks to @Retention(RetentionPolicy.SOURCE). > > http://java.sun.com/javase/6/docs/api/java/lang/annotation/RetentionPolicy.html#SOURCE > > Martin ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
