|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jdepend.framework.JavaPackage
The JavaPackage
class represents
a Java package.
Constructor Summary | |
---|---|
JavaPackage(java.lang.String name)
Constructs a JavaPackage instance with
the specified package name. |
|
JavaPackage(java.lang.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(java.util.List list)
Collects all the packages participating in a package dependency cycle which originates from this package. |
boolean |
collectCycle(java.util.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(java.lang.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. |
java.util.Collection |
getAfferents()
Returns the collection of afferent packages. |
int |
getClassCount()
Returns the total number of classes in this package. |
java.util.Collection |
getClasses()
Returns the collection of Java classes in this package. |
int |
getConcreteClassCount()
Returns the number of concrete classes in this package. |
java.util.Collection |
getEfferents()
Returns the collection of efferent packages. |
java.lang.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(java.util.Collection afferents)
Sets the collection of afferent packages. |
void |
setEfferents(java.util.Collection efferents)
Sets the collection of efferent packages. |
void |
setVolatility(int v)
Sets the volatility of this package. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JavaPackage(java.lang.String name)
JavaPackage
instance with
the specified package name.
name
- Package name.public JavaPackage(java.lang.String name, int volatility)
Method Detail |
public java.lang.String getName()
public int getVolatility()
public void setVolatility(int v)
v
- Volatility (0-1).public boolean containsCycle()
true
if a cycle exist;
false
otherwise.public boolean collectCycle(java.util.List list)
list
- Collecting object to be populated with
the list of JavaPackage instances in a cycle.
true
if a cycle exist;
false
otherwise.public boolean collectAllCycles(java.util.List list)
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.public void addClass(JavaClass clazz)
clazz
- Java class to add.public java.util.Collection getClasses()
public int getClassCount()
public int getAbstractClassCount()
public int getConcreteClassCount()
public void dependsUpon(JavaPackage imported)
imported
- Java package.public void addAfferent(JavaPackage jPackage)
jPackage
- Java package.public java.util.Collection getAfferents()
public void setAfferents(java.util.Collection afferents)
afferents
- Collection of afferent packages.public void addEfferent(JavaPackage jPackage)
jPackage
- Java package.public java.util.Collection getEfferents()
public void setEfferents(java.util.Collection efferents)
efferents
- Collection of efferent packages.public int afferentCoupling()
public int efferentCoupling()
public float instability()
public float abstractness()
public float distance()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- Other package.
true
if the packages are equal;
false
otherwise.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |