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.| Modifier and Type | Field and Description |
|---|---|
static int |
AVG_SSPFP
Avg Source Statements per Function Point in Java
|
| Constructor and Description |
|---|
PackageStatistics(java.lang.String name)
Creates a new
PackageStatistics instance. |
| Modifier and Type | Method and Description |
|---|---|
int |
getClassCount()
Get the class count
|
double |
getFunctionPointsCount()
Get the count of Function Points
|
int |
getHighestSeverityLevel()
Get the max serverity
|
int |
getLineCount()
Get the count of Line
|
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 |
incrementLineCount(int count)
Increment the count of Line 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 |
public static final int AVG_SSPFP
public PackageStatistics(java.lang.String name)
PackageStatistics instance.name - a String valuepublic java.lang.String getPackageName()
public void incrementClassCount(int count)
count - public int getClassCount()
public void incrementMethodCount(int count)
count - public int getMethodCount()
public void incrementViolationCount(int count)
count - public int getViolationCount()
public void incrementNCSSCount(int count)
count - public int getNCSSCount()
public double getFunctionPointsCount()
public void incrementLineCount(int count)
count - public int getLineCount()
public void incrementUnitTestClassCount(int count)
count - public int getUnitTestClassCount()
public void incrementUnitTestCount(int count)
count - public int getUnitTestCount()
public void setHighestSeverityLevel(int severity)
severity - public int getHighestSeverityLevel()
public java.lang.String toString()
toStringtoString in class java.lang.ObjectString value
JCSC is released under the terms of the GNU General Public License