I have a java compiled library in a jar.for which i have written documentation in source code.There is one more tool which generates the jar ,it included only those classes which are required for target project.I have huge projects which make use of this jar,and only those classes should go in the target project.
Now the problem
I want to give documentation for the classes.is it possible to generate documentation from the compiled classes?
I have a java compiled library in a jar.for which i have written documentation
Share
There is no simple way to do what you want, but you could try the following approach:
Extract the names of all
.classfiles in your JAR, filtering out any with$in their name and mapping the remainder to the original.javafile names.Create a temporary directory tree containing copies of all of the
.javafiles selected above.Run the
javadoccommand using the about tree as the sourcepath.If you don’t have too many files, you could skip the step of creating a directory tree and run the
javadoccommand with all.javafile names as command arguments.Either way, you will have some non-trivial scripting … or equivalent Java … to implement.