-----Original Message-----
From: tek1 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 05, 2003 3:12 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Code for auto-generating CUSTOM castor mapping
files
>do you mean that you want to automatically generate the mapping.xml file
>based on your .java classes?
Yes that is EXACTLY what I mean.
>have you checked out xdoclet's exolab/castor module?
Ok, maybe I don't understand their module correctly but from what I saw one has
to mark up their code (with xdoclet "comment" tags) for it to work
correctly. What I want is a solution that requires NO touching of the code we
want to generate mappings for (and I mean NO alterations, including comments).
There is nothing impossible about me pitching that we should recomment all code
with xdoclet metadata- but I'm not even sure I like the idea. Why: 1)
if I require people to put in this metadata I add another layer of writing, testing,
and debugging (not at all popular) 2) our work builds on other products (as does most
software these days), it would be VERY unpleasant to have to edit & test all the
third party stuff each time we did an upgrade of it.
To put it another way- I am one of the few people who care and bother about the
format and versioning of the data. The other people are (and should remain) simply
consumers of that data, and when they are writing logic why should they bother with
serialization details?
I want something exactly like xdoclet except that it does not require metadata-
it just scans classes and generates mappings on the fly. This isn't an impossible
task, but (in looking at what is involved) it is much more difficult than I naively
first guessed. It is really too bad that Java doesn't include methods for
querying the compiler, after all the compiler has to reliably parse the *.java
files so it would both already have some of the info I want and would have the other
info reliably packed away in neat datastructures.
