[java] Free utilities or tools used to "summarize" a java project (class interfaces)

Started by
8 comments, last by tebriel 18 years, 10 months ago
Is anyone familiar with any software out there that can look at Java code and simply "rip out" the class interfaces/data/comments and sorta summarize it without including actual source code? What I'd like to do is have a printed out "summary" of the class interfaces of a project so I can refine the design and such without having to print out ALL the source. Basically the same type of information a UML diagram would tell you would be fine--only in a printable text form rather than an unprintable diagram form. (The auto-UML-generating software I have can do this and generate a diagram, but it doesn't do a good job making it readable or printable.) Probably nothing like this exists, but I thought I'd ask. Basically I'd like to be able to "print out" an application's design and class structure information without printing the actual source code itself. For refactoring/redesign/refinement, or whatever you want to call it, type purposes.
Advertisement
uh... Javadoc ???
Does exactly what you want above, has been included with every version of java since ver 1.0. Its the standard tool for autogenerating java documentation.

http://java.sun.com/j2se/javadoc/

D.
Hmm, that produces basically what I'm interested in, but will it work well if the Java source in question doesn't use the appropriate commenting and tag syntax?

i.e.

/**
* Returns an Image object that can then be painted on the screen.
* The url argument must specify an absolute {@link URL}. The name
* argument is a specifier that is relative to the url argument.
*


* This method always returns immediately, whether or not the
* image exists. When this applet attempts to draw the image on
* the screen, the data will be loaded. The graphics primitives
* that draw the image will incrementally paint on the screen.
*
* @param url an absolute URL giving the base location of the image
* @param name the location of the image, relative to the url argument
* @return the image at the specified URL
* @see Image
*/

It's worth a try I guess, maybe it'll be sufficient, let's see...

without the special comments it'll just produce the list of classes/methods etc etc without any info. There are several source formatting tools out there though which can take a non javadocced source and stick in the right delimitters for comments and member variables and so on. Can't think of one off the top of my head right now.

D.
Hmm, it'd work, if only there was an easy way to print all those html pages...heh. Asking for something that specifically makes it easy to print may be a little too much to ask... although all I need is the same output javadoc generates on ONE long page. Hmm...
I've just cut and pasted Javadoc into Word before and its come out fine, might be worth looking into
you might also want to look at javap (see sdk documentation). And then redirect the output to file.

L-
"Education is when you read the fine print; experience is what you get when you don't." -Pete Seegerwww.lucid-edge.net
Redirect? I'm on Winblows here, when I tell Windoze to > it'll just say "wth?" :)

Besides, that would be too easy. I'm looking for a Microsoft solution.

(nobody take that line seriously lol)

The thing with a copy/paste into word from javadoc is that it's the very work that I'm trying to avoid. I'm talking about printing around 20-30 or more different class interfaces, if it was just 5 or something I'd be using notepad right now. :( And I'd also like to "update" (reprint) often, not really interested in spending 25 minutes a day hitting ctrl+c ctrl+v...

I will look into javap next... I have no idea what it is, so it's better than nothing.
Take a look at doxygen:
http://www.stack.nl/~dimitri/doxygen/

You can maintain the javadoc comments, but doxygen can generate output in different formats like LaTeX, HTML, RTF, Postscript and more.
Doh! I've heard of that before, totally forgot about it! That might work!!!

*checks*

That's perfect! Thanks!

This topic is closed to new replies.

Advertisement