public class MetricPackageModel extends PackageModel
PackageModel
class, this class compute various quality metrics about the package:
Constructor and Description |
---|
MetricPackageModel() |
MetricPackageModel(java.lang.String path) |
Modifier and Type | Method and Description |
---|---|
float |
abstractness()
Return the package's abstractness.
|
void |
addClass(ClassModel clazz)
Add a class in the package.
|
int |
afferentCoupling()
Return The afferent coupling (Ca) of this package.
|
void |
dependUpon(MetricPackageModel model)
Define that this package depend upon another package.
|
float |
distance()
Return the package's distance from the main sequence (D).
|
int |
efferentCoupling()
Return The efferent coupling (Ce) of this package.
|
int |
getAbstractClassCount()
Return the number of abstract classes in the package.
|
java.util.Map<java.lang.String,MetricPackageModel> |
getAfferentCoupling()
Return the Map of packages in other packages that that depend upon classes within the package.
|
int |
getClassCount()
Return the number of classes in the package.
|
java.util.Map<java.lang.String,ClassModel> |
getClasses()
Return the Map of classes in the package.
|
int |
getConcreteClassCount()
Return the number of concrete classes in the package.
|
java.util.Map<java.lang.String,MetricPackageModel> |
getEfferentCoupling()
Return the Map of packages in other packages that the classes in the package depend upon.
|
float |
instability()
Return the instability of this package. 0 indicates a completely stable package, while 1 indicates a
completely unstable package.
|
boolean |
isEmpty()
Return true if the package does not contain any classes.
|
addChild, getChildren, getName, getParent, setParent
public MetricPackageModel()
public MetricPackageModel(java.lang.String path)
public void addClass(ClassModel clazz)
clazz
- the classpublic java.util.Map<java.lang.String,ClassModel> getClasses()
public int getClassCount()
public boolean isEmpty()
public int getAbstractClassCount()
public int getConcreteClassCount()
public float abstractness()
public float distance()
public java.util.Map<java.lang.String,MetricPackageModel> getAfferentCoupling()
public int afferentCoupling()
public java.util.Map<java.lang.String,MetricPackageModel> getEfferentCoupling()
public int efferentCoupling()
public float instability()
public void dependUpon(MetricPackageModel model)
model
- the package upon which this pakcage depend on.Copyright © 2016-2023 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence