QDox does all the X2 source parsing, handing back objects from the QDox "model". Internally, it has a special case for external jars on the classpath, returning model objects with minimal information. You would want to supplement that routine to return the tag information that are in the annotated binaries as DocletTags. This could be done with JDK 1.5 reflection, but that would bind the parser to JDK 1.5. I think they currently support back to 1.2 or 1.3. While those may not be necessary, I'd say it's a bit too early to give up on 1.4.
That's probably all you would really need to get minimal functionality, presuming that the scope of your needs did not involve getting the annotations into the binaries in the first place. It would actually be a rather easy change, but I've personally had a lot of problems getting changes into QDox, spending more time trying to sell my changes than it took to write them in the first place. YMMV. I would get on their list and get agreement on the issues and that a patch you create that solves these issues will be accepted first. Good luck!
There's been interest recently for a permanent fork in QDox with less restrictions on getting code into the project, so if you aren't able to get the changes made there, there are still options that could solve things very rapidly. XDoclet2 is currently using a fork of QDox, and that may become permanent as they are unresponsive to rolling back changes that were put in while things were forked (breaking code that predates my interest or involvement in either project...)
hope it helps,
-b
Jose Gonzalez Gomez wrote:
Brian,
I sent it to [EMAIL PROTECTED] I'm currently testing my new gmail account, so I'm subscribed using two mail addresses. I sent it from my gmail address and I received it in my other mailbox without any problem... maybe some misconfigured mail filter on your side? Would you need me to send any message to the other list for testing purposes, feel free to ask.
About the parser... I understand that if I would be interested in doing something related, the right path would be to hack the QDox project... is XDoclet2 completely decoupled from the source annotation? I mean, if QDox would provide the same information to XDoclet2 either using XDoclet tags or Java annotations, would XDoclet2 work without any change?
About reading .class files... I haven't read the specification that much, but I got the feeling that you could access all the annotation information using the reflection API, so I don't think that accessing all the information that way would be more complicated than doing it with XJavadoc or QDox, maybe I'm missing anything here...
What's the third thing? :o)
Best regards Jose
On Tue, 14 Dec 2004 07:25:22 -0500, Brian Topping <[EMAIL PROTECTED]> wrote:
Hi Jose,
I didn't see this come across the X2 list, what address did you send to? Just want to confirm everything is operational...
What you are describing would work, but there are three components to the problem. The first one is a parser that can read annotated code. X2 relies on the QDox project, and they are in the initial stages of being able to accept code that has annotations in it. I'm not sure where or if they are going to make the code actually present the annotations to the client, but I also don't know if that affects you.
The second is being able to read the .class file format for annotated files. This is a bit more work. This could be done with runtime reflection on the classfiles in a JDK 1.5 environment, but work would be required to make the tool run under the different combinations of supported versions and build packaging to support that.
It will come, but there's nobody currently working on it (feel free to look at it though! :-)
-b
Jose Gonzalez Gomez wrote:
Hi there,
I sent this yesterday to the XDoclet2 list but nobody answered... I'm posting it here in the hope that somebody comments it, as I also think that this is applicable to XDoclet1...
First of all, this doesn't intend to be an attack to XDoclet, I've been using it for a long time and I've been quite pleased with it. Having said this, let's begin the criticism ;o)
I have recently come across a problem that it doesn't seem to have an easy or elegant solution: I was using maven to create a domain model containing classes persisted with Hibernate, and I splitted the model so I could have some reusable abstractions tagged with @hibernate tags. The problem is that when I used the Hibernate doclet to generate the mapping files I wasn't successful... why? Evidently because dependencies are commonly resolved using precompiled jars (at least in maven) and XDoclet didn't have access to the source files of the dependency containing the reusable abstractions.
As I told you before, I don't see an easy or elegant way of solving this other than including the source files of the dependency so XDoclet has access to them... why do I talk about Java annotations in the subject? Well, because, from my limited understanding of Java annotations gathered after a quick reading of the release notes, it seems that this could be easily solved if instead using XDoclet tags you used Java annotations. Java annotations seems to be an special kind of "interface" (take this with a bit of salt) so the annotation information seems to travel with the bytecode of the Java class and is accessible using the reflection API. So it seems you could have access to the annotations even if you don't have access to the source code of the dependency... am I wrong? If this is correct, my problem would be gone easily...
Best regards Jose
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user