abstractness
public float abstractness()
Returns the abstractness (A) of this package.
addAfferent
public void addAfferent(JavaPackage jPackage)
Adds the specified Java package as an afferent
of this package.
addClass
public void addClass(JavaClass clazz)
Adds the specified Java class to the package.
clazz
- Java class to add.
addEfferent
public void addEfferent(JavaPackage jPackage)
Adds the specified Java package as an efferent
of this package.
afferentCoupling
public int afferentCoupling()
Returns the afferent coupling (Ca) of this package.
collectAllCycles
public boolean collectAllCycles(List list)
Collects all the packages participating in
a package dependency cycle which originates
from this package.
This is a more exhaustive search than that
employed by
collectCycle
.
list
- Collecting object to be populated with
the list of JavaPackage instances in a cycle.
true
if a cycle exist;
false
otherwise.
collectCycle
public boolean collectCycle(List list)
Collects the packages participating in the
first package dependency cycle detected which
originates from this package.
list
- Collecting object to be populated with
the list of JavaPackage instances in a cycle.
true
if a cycle exist;
false
otherwise.
containsCycle
public boolean containsCycle()
Indicates whether the package contains
a package dependency cycle.
true
if a cycle exist;
false
otherwise.
dependsUpon
public void dependsUpon(JavaPackage imported)
Adds the specified Java package as an efferent
of this package and adds this package as an
afferent of it.
distance
public float distance()
Returns this package's distance from the main sequence (D).
efferentCoupling
public int efferentCoupling()
Returns the efferent coupling (Ce) of this package.
equals
public boolean equals(Object other)
Indicates whether the specified package is equal
to this package.
true
if the packages are equal;
false
otherwise.
getAbstractClassCount
public int getAbstractClassCount()
Returns the number of abstract classes
(and interfaces) in this package.
- Number of abstract classes.
getAfferents
public Collection getAfferents()
Returns the collection of afferent packages.
- Collection of afferent packages.
getClassCount
public int getClassCount()
Returns the total number of classes in
this package.
getClasses
public Collection getClasses()
Returns the collection of Java classes
in this package.
- Collection of Java classes.
getConcreteClassCount
public int getConcreteClassCount()
Returns the number of concrete classes in
this package.
- Number of concrete classes.
getEfferents
public Collection getEfferents()
Returns the collection of efferent packages.
- Collection of efferent packages.
getName
public String getName()
Returns the package name.
getVolatility
public int getVolatility()
Returns the volatility of this package.
instability
public float instability()
Returns the instability (I) of this package.
setAfferents
public void setAfferents(Collection afferents)
Sets the collection of afferent packages.
afferents
- Collection of afferent packages.
setEfferents
public void setEfferents(Collection efferents)
Sets the collection of efferent packages.
efferents
- Collection of efferent packages.
setVolatility
public void setVolatility(int v)
Sets the volatility of this package.