Class JDepend

  • All Implemented Interfaces:
    ParserListener

    public class JDepend
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      JDepend()
      Constructs a JDepend instance.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addDirectory​(java.lang.String name)
      Adds the specified directory name to the collection of directories to be analyzed.
      void analyze()
      Analyzes the registered directories, generates metrics for each Java package, and reports the metrics in a graphical format.
      static void main​(java.lang.String[] args)  
      void onParsedJavaClass​(JavaClass jClass)
      Called whenever a Java source file is parsed into the specified JavaClass instance.
      void setComponents​(java.lang.String components)
      Sets the comma-separated list of components.
      void setFilter​(PackageFilter filter)
      Sets the package filter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JDepend

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

      • addDirectory

        public void addDirectory​(java.lang.String name)
                          throws java.io.IOException
        Adds the specified directory name to the collection of directories to be analyzed.
        Parameters:
        name - Directory name.
        Throws:
        java.io.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​(java.lang.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​(java.lang.String[] args)