Looking for a tool that:
- Produces a visually pleasing (not garish), orthogonally structured graph hierarchy
- Outputs high-quality PNG images (300dpi+)
- Visually differentiates classes, abstract classes, interfaces, and enumerated types (preferably by colour)
- Interactive user interface
- Allows pruning of packages and/or individual classes from the diagram
- Seeds (e.g., File » Open) using a set of:
- Directories
- JAR files
- Individual source files
- Individual compiled classes
- Performs a fully automatic analysis of class dependencies
- Searches classpath to resolve as many unmet dependencies as possible
- Uses a single executable
- Is lightweight (~5MB) and fast (loads in under one second on an average 1.5GHz machine)
- Is simple (under 10 clicks to generate a graph)
- Is quick (graph 100 objects in a few seconds)
- Is easy to use (minimal interface, focused on graph generation)
- Is OSS or GPL
- (Optional) Generates a call-graph hierarchy
Tools that will not accomplish this task include:
- Doxygen + GraphViz (or dot)
- Eclipse
- UML modellers
- Structural Analysis for Java (cannot parse source files)
- JUDE Community (awkard interface, unsuitable autogeneration)
- Integrated development environments (too complex, and use too much memory)
Any ideas?
The answer is probably "no such OSS / free application exists". Why? Because:
- 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.
- 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???
It seems that Class Visualizer meets all your requirements (except of saving diagram as PNG).
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
来源:https://stackoverflow.com/questions/1168753/application-to-generate-java-class-hierarchy-diagram