+1  A: 

The Netbeans UML plugin will cover some of your requirements.

  • Produces a visually appealing graph hierarchy: a matter of taste
  • Writes high-quality PNG images (300dpi+): I don't know
  • Visually differentiates classes, abstract classes, interfaces, and enumerated types: yes it does as it uses UML
  • Interactive user interface: yes
  • Allows pruning of packages and/or individual classes from the diagram: yes
  • Seeds (e.g., File » Open) using a set of: it work with netbeans projects
    • Directories
    • JAR files
    • Individual source files
    • Individual compiled classes
  • Performs a fully automatic analysis: maybe
  • Uses a single executable: not applicable, it's a plugin of Netbeans
  • Is lightweight and fast: like netbeans
  • Is simple, quick, and easy to use: depends of user
  • Is OSS or GPL: I think it is OSS, surely it is free as in free drink
  • (Optional) Generates a call-graph hierarchy (in addition to a class hierarchy): I don't think it does
Andrea Francia
IDEs are neither simple nor lightweight (around 5MB). IDEs require configuring source paths, adding projects, and other steps. I just want to dump directories and click "Generate Graph" (that's what I mean by "simple"). NetBeans probably performs automatic analysis: it figures out class dependencies on-the-fly. UML is off the list (there are many amazing UML modelers available, but they don't tend to meet the given criteria).
Dave Jarvis
Did you read the phrase "will cover *some* of your requirements"?
Andrea Francia
+3  A: 

The answer is probably "no such OSS / free application exists". Why? Because:

  1. Most people who want an inheritance diagram for a large number of classes are already working in the context of an IDE or similar. Ergo there is little motivation for OSS developers to produce such a tool.
  2. Automatically creating visually appealing diagrams of large numbers of classes is next to impossible.

I suggest that you relax your requirements. I mean, what is wrong with using a large scale IDE or UML modeller? Memory is cheap. What is wrong with waiting a few seconds to load / run the diagrammer? Patience grasshopper! What high-school student with 2 days of training is going to be looking at source-code base with 10,000+ classes???

Stephen C
Ignore the 10,000 classes comment. I was trying to emphasize the simplicity of the tool: something that Dilbert's boss could use. ;-)
Dave Jarvis
Memory may be cheap, but needs to be requisitioned and justified, then installed by a certified technician. Plus, I'm already running one IDE (JDeveloper), amongst many other tools, and don't really care to run yet another IDE (much less configure it, create new packages, and duplicate the entire existing project structure to avoid contamination [secondary project files, hidden config files, additional JVMs, classpath/path changes, and so forth]) for such a relatively benign task.
Dave Jarvis
My basic points still stands. Your requirements are not likely to be met by any existing OSS product.
Stephen C
Thanks for the tips, Stephen. Also, if you'd like proper attribution for your algorithm, let me know. Re: http://stackoverflow.com/questions/1250169/transform-map-with-multiple-values-to-tree
Dave Jarvis
+1  A: 

Hierarchy

A non-UML, relatively simple way of generating a class hierarchy from a set of Java classes now exists. It does not meet the following requirements:

  • Visually differentiate classes, abstract classes, interfaces, and enumerated types (preferably by colour)
  • Interactive user interface
  • Allow pruning of packages and/or individual classes from the diagram

Solution

The solution includes:

  • Class Analyzer: a reusable, standalone API for performing general class file analysis.
  • Hierarchy: a complete application that uses Class Analyzer and prefuse to draw the graph.
  • prefuse example: shows how to use the prefuse API.
  • GraphViz example: shows how to display the hierarchy using dot.
  • BCEL example: shows how to use the BCEL API to analyze class files.
  • Fully documented source code (every package, class, and method).
  • SRS, technical documentation, and User Manual.
  • build example: an example for performing a variety of common tasks using ant.

Hierarchy Download Page

Dave Jarvis
Your distribution needs to make the licensing more explicit. I shouldn't have to look at every source file to figure it out.
Stephen C
I could see no License.txt file in an obvious place. There was a directory containing licenses information for the things that your code depends on, but nothing for your code ... apart from headers in the couple of files that I looked at. Without a License.txt file, I need to check each source file. This is NOT SARCASM!
Stephen C
P.S. It is normal practice to include a file called License.txt or Readme.txt or something similar in the top level of a distribution that states clearly what the licensing terms are.
Stephen C
P.P.S. A file called "hierarchy.txt" is not somewhere I'd normally look for overall license information. I recommend that you stick to normal conventions: a License.txt file in the distro's main directory is the easiest to find, IMO.
Stephen C
@Stephen: Thank you for the feedback.
Dave Jarvis