查看 java 类结构图:Class Visualizer

gwxd 8年前

Class Visualizer 可以查看 java 类结构图,从javajar文件或者class文件

主要特性:
  1. Auto-generated class diagram
    Double click on any class name generates and shows instant class diagram for it.
    Class diagram shows selected class with all its relations (including those used in parameterized types):
    parents, children, outbound and inbound references (nested classes, associations, dependencies, annotations, thrown exceptions).
    Classes, interfaces, enums, annotations, exceptions are distinguished by different background color.
    Library classes referenced by project classes are distinguished by grey color (like Serializable, Date, List, String on the Welcome screenshot).
    Class diagram allows its browsing and navigation. Click on any class shows its UML preview. Double click on any class navigates into it. KeystrokeAlt+Leftnavigates into a previous diagram, andAlt+Right- into a next one.
    Note: If placing of all referenced classes on a diagram would exceed significantly size of the biggest connected screen, they are merged into one information box (like subclasses on this screenshot); they can still be viewed one by one in the browser (described in one of next sections).
    Class diagram can be copied as an image into the clipboard by pressingCtrl+C.

  2. Instant UML class preview
    Selection of any class in any view shows its UML preview.
    On the preview, class members are grouped into 5 categories: constants, fields, properties, constructors, methods.
    In addition, element and members annotations, stereotypes, modifiers, flags as well as element's parent are also shown in the preview.
    Right click on the preview selects the class on the hierarchy (described in one of next sections).
    Class preview can be selected (fully or partially) and copied into the clipboard, for use in other tools, i.e. text processors; full preview can be copied by pressingCtrl+AandCtrl+C.

  3. Class elements and relations browser
    Class AccessibleObject, presented on the preview, is also shown in the tree-form browser. The browser allows to take a detailed look into every element: class, member, relation. Each group (i.e. Methods) shows number of contained elements. Choosing Expand sub-tree from the context menu expands the whole sub-tree of the selected nodes (i.e. full declarations of all methods, while chosen on the Methods node).
    In addition to a data visible on UML preview, annotations are shown with all their parameters and values.
    Each related class can be examined in details after selecting Show content from the context menu. Figure below shows choosing this menu item for 3 selected classes.
    Selection of a class shows its preview. Double click on a class shows class diagram for it.

  4. Classes list
    All loaded classes are shown on the list. It can be sorted by short and full name in ascending and descending order. It can be also filtered by part of full name.
    The list presented in the figure below shows classes containing text scrum in a full name and is sorted by a full name.
    Each selected value can be copied by pressingCtrl+C- for example into an IDE.
    Classes, interfaces, enums, annotations, exceptions are distinguished by different background color.
    Selection of a class shows its preview. Double click on a class shows its class diagram.

  5. Classes hierarchy
    All loaded classes are shown on the hierarchy. It shows classes with information about number of their children.
    Choosing Expand sub-tree from context menu expands all children of selected classes - as shown on the figure below.
    Selection of a class shows its preview. Double click on a class shows its class diagram.

  6. No repository, no synchronization problems
    This tool works directly with Java bytecode, without storing it into an intermediate repository. Thanks to that there are no problems with synchronization of a repository with the code.

  7. Saving loaded content as a project
    All added class paths and loaded classes form a project. Such project can be stored in a file and open later. After rebuild of analyzed code, it is enough to select a saved project from history and all content will be reloaded.

项目主页:http://www.open-open.com/lib/view/home/1445699250710