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