Class JDepend

java.lang.Object
jdepend.swingui.JDepend
All Implemented Interfaces:
ParserListener

public class JDepend extends Object implements ParserListener
The JDepend class analyzes directories of Java class files, generates metrics for each Java package, and reports the metrics in a Swing tree.
Author:
Mike Clark, Clarkware Consulting, Inc.
  • Constructor Details

    • JDepend

      public JDepend()
      Constructs a JDepend instance.
  • Method Details

    • addDirectory

      public void addDirectory(String name) throws IOException
      Adds the specified directory name to the collection of directories to be analyzed.
      Parameters:
      name - Directory name.
      Throws:
      IOException - If the directory does not exist.
    • setFilter

      public void setFilter(PackageFilter filter)
      Sets the package filter.
      Parameters:
      filter - Package filter.
    • setComponents

      public void setComponents(String components)
      Sets the comma-separated list of components.
    • analyze

      public void analyze()
      Analyzes the registered directories, generates metrics for each Java package, and reports the metrics in a graphical format.
    • onParsedJavaClass

      public void onParsedJavaClass(JavaClass jClass)
      Called whenever a Java source file is parsed into the specified JavaClass instance.
      Specified by:
      onParsedJavaClass in interface ParserListener
      Parameters:
      jClass - Parsed Java class.
    • main

      public static void main(String[] args)