This one time, at band camp, Daniel Shriver said:

DS>   I was wondering if there is code available for auto-generating custom
DS>Castor mappings.  I ask because I am faced with the task of serializing
DS>quite a bit of legacy code and most of it is poorly formed.  The code
DS>sometimes conforms to "Bean" standards (well named getters and setters for
DS>instance variables) and sometimes doesn't (mismatched or lopsided getters &
DS>setters, poorly named getters or setters...) and my understanding is that
DS>would confuse Castor.  While it is possible for me to rewrite the legacy
DS>code that isn't a practical solution in this case.  My first inclination is
DS>that I should write a program that scans *.java files and "intelligently"
DS>generates mapping files (isolating instance variables on first pass and
DS>determining getters and setters via a "common sence heuristic" on the second
DS>pass).  This sounds quite easy at first, but I am a bit vexed since the
DS>legacy code has lots of inner classes.

Daniel,

Not only is this a complex task, but AFAIK there is nothing available
that will do this. However, among other tools, there is a GUI for
creating Castor mapping descriptors
(http://o2xmapper.sourceforge.net/jdomapper). But my favorite is
XDoclet (http://xdoclet.sf.net/) so that the mapping descriptors
are generated dynamically each time you compile ;-) - very nice!

Bruce
--

perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to