rj.tools.jcsc.ant
Class PackageStatistics

java.lang.Object
  |
  +--rj.tools.jcsc.ant.PackageStatistics

public class PackageStatistics
extends java.lang.Object

PackageStatistics is used to keep track about all information of a package. You create a new instance providing the name of the package. Then after each class of this package has been parsed you increment the values.

Version:
1.0
Author:
Ralph Jocham

Constructor Summary
PackageStatistics(java.lang.String name)
          Creates a new PackageStatistics instance.
 
Method Summary
 int getClassCount()
          Get the class count
 int getHighestSeverityLevel()
          Get the max serverity
 int getMethodCount()
          Get the count of methods
 int getNCSSCount()
          Get the count of NCSS
 java.lang.String getPackageName()
          Get the name of the package
 int getUnitTestClassCount()
          Get the count of unit test classes
 int getUnitTestCount()
          Get the count of unit tests
 int getViolationCount()
          Get the violations count
 void incrementClassCount(int count)
          Increment class count by count
 void incrementMethodCount(int count)
          Increment the count of methods by count
 void incrementNCSSCount(int count)
          Increment the count of NCSS by count
 void incrementUnitTestClassCount(int count)
          Increment the count of unit test classes by count
 void incrementUnitTestCount(int count)
          Increment the count of unit tests by count
 void incrementViolationCount(int count)
          Increment the count of violations by count
 void setHighestSeverityLevel(int severity)
          Set the max severity found so far
 java.lang.String toString()
          toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PackageStatistics

public PackageStatistics(java.lang.String name)
Creates a new PackageStatistics instance.
Parameters:
name - a String value
Method Detail

getPackageName

public java.lang.String getPackageName()
Get the name of the package
Returns:
String

incrementClassCount

public void incrementClassCount(int count)
Increment class count by count
Parameters:
count -  

getClassCount

public int getClassCount()
Get the class count
Returns:
int

incrementMethodCount

public void incrementMethodCount(int count)
Increment the count of methods by count
Parameters:
count -  

getMethodCount

public int getMethodCount()
Get the count of methods
Returns:
int

incrementViolationCount

public void incrementViolationCount(int count)
Increment the count of violations by count
Parameters:
count -  

getViolationCount

public int getViolationCount()
Get the violations count
Returns:
int

incrementNCSSCount

public void incrementNCSSCount(int count)
Increment the count of NCSS by count
Parameters:
count -  

getNCSSCount

public int getNCSSCount()
Get the count of NCSS
Returns:
int

incrementUnitTestClassCount

public void incrementUnitTestClassCount(int count)
Increment the count of unit test classes by count
Parameters:
count -  

getUnitTestClassCount

public int getUnitTestClassCount()
Get the count of unit test classes
Returns:
int

incrementUnitTestCount

public void incrementUnitTestCount(int count)
Increment the count of unit tests by count
Parameters:
count -  

getUnitTestCount

public int getUnitTestCount()
Get the count of unit tests
Returns:
int

setHighestSeverityLevel

public void setHighestSeverityLevel(int severity)
Set the max severity found so far
Parameters:
severity -  

getHighestSeverityLevel

public int getHighestSeverityLevel()
Get the max serverity
Returns:
severity

toString

public java.lang.String toString()
toString
Overrides:
toString in class java.lang.Object
Returns:
a String value


(c) 1999-2004 by Ralph Jocham (rjocham72@netscape.net)
JCSC is released under the terms of the GNU General Public License