Author:  Mike Atkinson Software
Release Notes

Previous Page


Next Page

Java Metrics

The advantage of being able to create a parse tree for a Java source file, is that you can count various things about the source file. Currently the metrics are a little rough, but you can gather them from a source tree.

The current program gathers the following metrics:

  • Number of statements
  • Number of public instance methods
  • Number of nonpublic instance methods
  • Number of class methods
  • Number of instance variables
  • Number of class variables
  • Number of abstract classes
  • Number of interfaces

It also outputs the metrics in a text form that allows the data to be sorted.

This program has two types of outputs. The first option is the text output. The second option is the comma delimited to simplify loading into a spreadsheet.



java Metrics [-comma|-text] <dir> Traverses the directory specified and acquires metrics for all .java files found in the source tree.

Previous Page

Last Modified: October 7, 2003

Previous Page