- Posted by: Sameer Wadkar
- Posted on: March 31 2004 18:59 EST
I am new to XDOCLET but with whatever little I have read I see that for XDOCLET to work properly the XDOCLET tags need to be in javadoc style. But does the file containing these Javadoc style comments have to be a .java file. Can it not be any file which contains XDOCLET tags.
- Can XDOCLET work with non java files containing javadoc comments by Paul Strack on April 01 2004 01:27 EST
So far as I know, the answer is no. Since XDoclet piggy-backs on Javadoc, it is limited to files that Javadoc can process. Javadoc requires both the source code and the compile Java classes. Therefore, Javadoc (and XDoclet) can't process non-Java files.
So far as I know, the answer is no. Since XDoclet piggy-backs on Javadoc, it is limited to files that Javadoc can process. Javadoc requires both the source code and the compile Java classes. Therefore, Javadoc (and XDoclet) can't process non-Java files.This is not exactly the truth. It dependes on which version of XDoclet is used. The 1.2 version is using xjavadoc which is performs faster than the JavaDoc Doclets. XDoclet 2 is using qdox. Older version used a JavaDoc Doclet.
But in for both version I would say no, as it usally means that you have to write a source parser. qdox used JFlex and BYacc/J as parser generator . JavaCC and ANTLR would be also fine alternatives.
Thanks for the replies all of you. I have two questions-
1. Is XDOCLET 2 released as yet. I tried to look for it but it seems its not released as yet?
2. How difficult is it to write your own parser? It might still save me a lot of effort than to create the entire application from scratch.
The current XDoclet 2 source code appears to be at: http://xdoclet.codehaus.org/
It hasn't been released, but you could alway pull stuff out of the CVS. I haven't bothered; it looks pretty unfinished at the moment.
If you want to build a full language parser using the tools the other poster mentioned, it would be a more lengthy undertaking. To be honest, I haven't done anything that ambitious. I do most of my code generation though relatively simple Velocity or XSLT base programming.