sandmark.statistics
Class Metric
java.lang.Object
|
+--sandmark.statistics.Metric
- Direct Known Subclasses:
- ckOOmetric, Halstead, HarrisonMagel, kafura, mcCabe, munson
- public class Metric
- extends java.lang.Object
This class is the base class for all the metrics implementation. The different
implementations (such as Halstead, McCabe, CK, etc) extend from this Metric class.
Method Summary |
java.lang.String |
getAffectingFactors()
|
int |
getAppMeasure()
|
int |
getAppMeasure(java.lang.String property)
|
int |
getClassMeasure(java.lang.String packageName,
java.lang.String className)
|
int |
getClassMeasure(java.lang.String packageName,
java.lang.String className,
java.lang.String property)
this method should only be invoked if property is null, otherwise subclass will be invoked |
java.util.Vector |
getClassNames()
|
java.lang.String |
getDescription()
|
int |
getLowerBound(int level)
|
int |
getMethodMeasure(java.lang.String packageName,
java.lang.String className,
java.lang.String methodName)
|
int |
getMethodMeasure(java.lang.String packageName,
java.lang.String className,
java.lang.String methodName,
java.lang.String property)
|
java.util.Vector |
getMethodNames()
|
java.lang.String |
getMetricName()
|
java.util.Vector |
getMetricProperties()
|
float |
getNormalValue(int absoluteValue,
int level)
|
int |
getNumberOfProperties()
|
int |
getPackageMeasure(java.lang.String packageName)
|
java.util.Vector |
getPackageNames()
|
java.lang.String |
getThresholdInfo()
|
int |
getUpperBound(int level)
|
java.lang.String |
getUrl()
|
boolean |
hasProperty()
|
int |
validateClass(java.lang.String packageName,
java.lang.String className)
|
int |
validateMethod(java.lang.String packageName,
java.lang.String className,
java.lang.String methodName)
|
int |
validatePackage(java.lang.String packageName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG
protected boolean DEBUG
metricName
protected java.lang.String metricName
shortDescription
protected java.lang.String shortDescription
affectFactors
protected java.lang.String affectFactors
thresholdInfo
protected java.lang.String thresholdInfo
urlInfo
protected java.lang.String urlInfo
applnName
protected java.lang.String applnName
className
protected java.lang.String className
appLowerBound
protected int appLowerBound
appUpperBound
protected int appUpperBound
packageLowerBound
protected int packageLowerBound
packageUpperBound
protected int packageUpperBound
classLowerBound
protected int classLowerBound
classUpperBound
protected int classUpperBound
methodLowerBound
protected int methodLowerBound
methodUpperBound
protected int methodUpperBound
methodMeasure
protected java.util.Vector methodMeasure
classMeasure
protected java.util.Vector classMeasure
packageMeasure
protected java.util.Vector packageMeasure
appMeasure
protected java.util.Vector appMeasure
applicationMeasure
protected int applicationMeasure
complexityProperties
protected java.util.Vector complexityProperties
methodNames
protected java.util.Vector methodNames
classNames
protected java.util.Vector classNames
packageNames
protected java.util.Vector packageNames
defaultValue
protected int defaultValue
metricProperty
protected boolean metricProperty
Metric
public Metric()
getMetricName
public java.lang.String getMetricName()
getDescription
public java.lang.String getDescription()
getAffectingFactors
public java.lang.String getAffectingFactors()
getThresholdInfo
public java.lang.String getThresholdInfo()
getUrl
public java.lang.String getUrl()
getNormalValue
public float getNormalValue(int absoluteValue,
int level)
getLowerBound
public int getLowerBound(int level)
getUpperBound
public int getUpperBound(int level)
getPackageNames
public java.util.Vector getPackageNames()
getClassNames
public java.util.Vector getClassNames()
getMethodNames
public java.util.Vector getMethodNames()
getMetricProperties
public java.util.Vector getMetricProperties()
getNumberOfProperties
public int getNumberOfProperties()
validatePackage
public int validatePackage(java.lang.String packageName)
validateClass
public int validateClass(java.lang.String packageName,
java.lang.String className)
validateMethod
public int validateMethod(java.lang.String packageName,
java.lang.String className,
java.lang.String methodName)
getAppMeasure
public int getAppMeasure()
getMethodMeasure
public int getMethodMeasure(java.lang.String packageName,
java.lang.String className,
java.lang.String methodName)
getClassMeasure
public int getClassMeasure(java.lang.String packageName,
java.lang.String className)
getPackageMeasure
public int getPackageMeasure(java.lang.String packageName)
getClassMeasure
public int getClassMeasure(java.lang.String packageName,
java.lang.String className,
java.lang.String property)
- this method should only be invoked if property is null, otherwise subclass will be invoked
getMethodMeasure
public int getMethodMeasure(java.lang.String packageName,
java.lang.String className,
java.lang.String methodName,
java.lang.String property)
getAppMeasure
public int getAppMeasure(java.lang.String property)
hasProperty
public boolean hasProperty()