gr.spinellis.ckjm
Class MetricsFilter

java.lang.Object
  extended by gr.spinellis.ckjm.MetricsFilter

public class MetricsFilter
extends java.lang.Object

Convert a list of classes into their metrics. Process standard input lines or command line arguments containing a class file name or a jar file name, followed by a space and a class file name. Display on the standard output the name of each class, followed by its six Chidamber Kemerer metrics: WMC, DIT, NOC, CBO, RFC, LCOM

Version:
$Revision: 1.9 $
Author:
Diomidis Spinellis
See Also:
ClassMetrics

Constructor Summary
MetricsFilter()
           
 
Method Summary
static boolean includeAll()
          Return true if the measurements should include all classes
static boolean isJdkIncluded()
          Return true if the measurements should include calls to the Java JDK into account
static void main(java.lang.String[] argv)
          The filter's main body.
(package private) static void processClass(ClassMetricsContainer cm, java.lang.String clspec)
          Load and parse the specified class.
static void runMetrics(java.lang.String[] files, CkjmOutputHandler outputHandler)
          The interface for other Java based applications.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetricsFilter

public MetricsFilter()
Method Detail

isJdkIncluded

public static boolean isJdkIncluded()
Return true if the measurements should include calls to the Java JDK into account


includeAll

public static boolean includeAll()
Return true if the measurements should include all classes


processClass

static void processClass(ClassMetricsContainer cm,
                         java.lang.String clspec)
Load and parse the specified class. The class specification can be either a class file name, or a jarfile, followed by space, followed by a class file name.


runMetrics

public static void runMetrics(java.lang.String[] files,
                              CkjmOutputHandler outputHandler)
The interface for other Java based applications. Implement the outputhandler to catch the results

Parameters:
files - Class files to be analyzed
outputHandler - An implementation of the CkjmOutputHandler interface

main

public static void main(java.lang.String[] argv)
The filter's main body. Process command line arguments and the standard input.