Hello there,
I am using Sun's
Doclet API to parse source code and write newly created
Java source files (which don't contain any private members).
Wrote a program which reads in Java source files (using the JVM's javadoc command line utility through an
Ant target) and creates new Java source files (using Sun's Doclet API located inside tools.jar).
My problem is that it doesn't seem to create the fully qualified package directory structure (meaning that inside the destination directory, I want it to place the correct package sub directory like this: /destination/com/sourcetool).
My doclet does parse the Java source files correctly but just places the newly created Java source files inside the destination directory with out the top level directories.
Here's the breakdown of my code:
(1) Have a top-level project directory which is specified as:
C:\Projects\SourceTool\
(2) My actual file exists inside:
C:\Projects\SourceTool\src\com\sourcetool\MyDoclet.java
(3) The destination where I want the subdirectories is located here:
C:\Projects\SourceTool\destination
The reason for I am using File I/O is because I read that if one is trying to invoke a Java Doclet with the -d (the destination flag for the javadoc command line utility) with a -doclet flag that the JVM becomes fails to located the doclet (which is MyDoclet.java) location.
Here's my code:
Ant target:
Build.properties:
I believe my problem is more so based on the fact that I am improperly using Java's File I/O API than anything else.
Would really be happy if someone could assist me...
Thanks again,
Mike
[ July 20, 2008: Message edited by: Michael K. Wilson ]